Skip to content

Commit

Permalink
テストを書く準備
Browse files Browse the repository at this point in the history
  • Loading branch information
kurozumi committed Sep 3, 2019
1 parent aa0929b commit 5bffef4
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 2 deletions.
@@ -1,7 +1,7 @@
<?php


namespace Plugin\EccubeMakerBundle\DependencyInjection;
namespace Plugin\EccubeMakerBundle\DependencyInjection\Compiler;


use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
Expand Down
2 changes: 1 addition & 1 deletion Resource/config/services_dev.php
@@ -1,5 +1,5 @@
<?php

use Plugin\EccubeMakerBundle\DependencyInjection\FormPass;
use Plugin\EccubeMakerBundle\DependencyInjection\Compiler\FormPass;

$container->addCompilerPass(new FormPass());
9 changes: 9 additions & 0 deletions Tests/DependencyInjection/Compiler/FormPassTest.php
@@ -0,0 +1,9 @@
<?php

namespace Plugin\EccubeMakerBundle\Tests\DependencyInjection\Compiler;

use Eccube\Tests\EccubeTestCase;

class FormPassTest extends EccubeTestCase
{
}
16 changes: 16 additions & 0 deletions Tests/bootstrap.php
@@ -0,0 +1,16 @@
<?php
/*
* This file is part of EC-CUBE
*
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
*
* http://www.ec-cube.co.jp/
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$loader = require __DIR__.'/../../../../vendor/autoload.php';
$envFile = __DIR__.'/../../../../.env';
if (file_exists($envFile)) {
(new \Symfony\Component\Dotenv\Dotenv())->load($envFile);
}
30 changes: 30 additions & 0 deletions phpunit.xml.dist
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.5/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="Tests/bootstrap.php"
>
<php>
<ini name="error_reporting" value="-1" />
<env name="KERNEL_CLASS" value="Eccube\Kernel" />
<env name="APP_ENV" value="test" />
<env name="APP_DEBUG" value="1" />
<env name="SHELL_VERBOSITY" value="-1" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak" />
<!-- define your env variables for the test env here -->
</php>

<!-- テストの場所 -->
<testsuites>
<testsuite name="Plugin Test Suite">
<directory>./Tests</directory>
</testsuite>
</testsuites>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
<listener class="\DAMA\DoctrineTestBundle\PHPUnit\PHPUnitListener" />
</listeners>
</phpunit>

0 comments on commit 5bffef4

Please sign in to comment.