Issues (91)

tests/ZenstruckScheduleBundleTest.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Zenstruck\ScheduleBundle\Tests;
4
5
use PHPUnit\Framework\TestCase;
0 ignored issues
show
The type PHPUnit\Framework\TestCase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Zenstruck\ScheduleBundle\DependencyInjection\Compiler\ScheduleBuilderKernelPass;
8
use Zenstruck\ScheduleBundle\ZenstruckScheduleBundle;
9
10
/**
11
 * @author Kevin Bond <[email protected]>
12
 */
13
final class ZenstruckScheduleBundleTest extends TestCase
14
{
15
    /**
16
     * @test
17
     */
18
    public function compiler_pass_is_added()
19
    {
20
        $container = new ContainerBuilder();
21
        $bundle = new ZenstruckScheduleBundle();
22
23
        $bundle->build($container);
24
25
        $foundPass = false;
26
27
        foreach ($container->getCompilerPassConfig()->getBeforeOptimizationPasses() as $pass) {
28
            if ($pass instanceof ScheduleBuilderKernelPass) {
29
                $foundPass = true;
30
            }
31
        }
32
33
        $this->assertTrue($foundPass, 'Compiler pass was not found');
34
    }
35
}
36