ScheduleExtensionSubscriberTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
c 0
b 0
f 0
dl 0
loc 17
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A hp$0 ➔ can_configure_schedule_with_subscriber() 0 12 1
can_configure_schedule_with_subscriber() 0 12 ?
1
<?php
2
3
namespace Zenstruck\ScheduleBundle\Tests\EventListener;
4
5
use PHPUnit\Framework\TestCase;
0 ignored issues
show
Bug introduced by
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 Zenstruck\ScheduleBundle\EventListener\ScheduleExtensionSubscriber;
7
use Zenstruck\ScheduleBundle\Tests\Fixture\MockScheduleBuilder;
8
9
/**
10
 * @author Kevin Bond <[email protected]>
11
 */
12
final class ScheduleExtensionSubscriberTest extends TestCase
13
{
14
    /**
15
     * @test
16
     */
17
    public function can_configure_schedule_with_subscriber()
18
    {
19
        $extension = new class() {
20
        };
21
22
        $schedule = (new MockScheduleBuilder())
23
            ->addSubscriber(new ScheduleExtensionSubscriber([$extension]))
24
            ->getRunner()
25
            ->buildSchedule()
26
        ;
27
28
        $this->assertSame($extension, $schedule->getExtensions()[0]);
29
    }
30
}
31