Passed
Pull Request — master (#18)
by Alex
02:21
created

EventDispatcherFactoryTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ArpTest\EventDispatcher\Factory;
6
7
use Arp\EventDispatcher\Factory\EventDispatcherFactory;
8
use Arp\EventDispatcher\Listener\AddableListenerProviderInterface;
9
use Arp\Factory\FactoryInterface;
10
use PHPUnit\Framework\MockObject\MockObject;
11
use PHPUnit\Framework\TestCase;
12
13
/**
14
 * @author  Alex Patterson <[email protected]>
15
 * @package ArpTest\EventDispatcher\Factory
16
 */
17
final class EventDispatcherFactoryTest extends TestCase
18
{
19
    /**
20
     * @var AddableListenerProviderInterface|MockObject
21
     */
22
    private $listenerProvider;
23
24
    /**
25
     * Prepare the test case dependencies
26
     */
27
    public function setUp(): void
28
    {
29
        $this->listenerProvider = $this->getMockForAbstractClass(AddableListenerProviderInterface::class);
30
    }
31
32
    /**
33
     * Assert that the event dispatcher factory implements FactoryInterface.
34
     *
35
     * @covers \Arp\EventDispatcher\Factory\EventDispatcherFactory
36
     */
37
    public function testImplementsFactoryInterface(): void
38
    {
39
        $factory = new EventDispatcherFactory();
40
41
        $this->assertInstanceOf(FactoryInterface::class, $factory);
42
    }
43
}
44