Total Complexity | 4 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
22 | class FactoryMethodTest extends PHPUnit_Framework_TestCase |
||
23 | { |
||
24 | /** |
||
25 | * @var FactoryMethodInterface |
||
26 | */ |
||
27 | private $factory; |
||
28 | |||
29 | protected function setUp(): void |
||
30 | { |
||
31 | $this->factory = new FactoryMethod(); |
||
32 | } |
||
33 | |||
34 | public function testProducts() |
||
35 | { |
||
36 | $this->assertEquals($this->getFactory()->create(FirstProduct::class)->getClassName(), FirstProduct::class); |
||
37 | $this->assertEquals($this->getFactory()->create(SecondProduct::class)->getClassName(), SecondProduct::class); |
||
38 | } |
||
39 | |||
40 | public function testFactoryMethod() |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @return FactoryMethod |
||
49 | */ |
||
50 | public function getFactory(): FactoryMethodInterface |
||
53 | } |
||
54 | } |
||
55 |