Total Complexity | 3 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
19 | class ModifierFactoryTest extends \PHPUnit\Framework\TestCase |
||
20 | { |
||
21 | protected $factory; |
||
22 | |||
23 | protected function setUp(): void |
||
24 | { |
||
25 | parent::setUp(); |
||
26 | $this->factory = new ModifierFactory(); |
||
27 | } |
||
28 | |||
29 | public function testDiscount() |
||
30 | { |
||
31 | $discount = $this->factory->discount(); |
||
32 | $this->assertInstanceOf(Discount::class, $discount); |
||
33 | } |
||
34 | |||
35 | public function testNewEveryTime() |
||
36 | { |
||
37 | $one = $this->factory->reason('test'); |
||
38 | $two = $this->factory->reason('test'); |
||
39 | $this->assertTrue($one !== $two); |
||
40 | } |
||
42 |