Total Complexity | 4 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
11 | final class ModelFactoryTest extends UnitTestCase |
||
12 | { |
||
13 | /** |
||
14 | * @test |
||
15 | */ |
||
16 | public function can_set_states_with_method(): void |
||
17 | { |
||
18 | $this->assertFalse(PostFactory::new()->withoutPersisting()->create()->isPublished()); |
||
|
|||
19 | $this->assertTrue(PostFactory::new()->published()->withoutPersisting()->create()->isPublished()); |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * @test |
||
24 | */ |
||
25 | public function can_set_state_via_new(): void |
||
26 | { |
||
27 | $this->assertFalse(PostFactory::new()->withoutPersisting()->create()->isPublished()); |
||
28 | $this->assertTrue(PostFactory::new('published')->withoutPersisting()->create()->isPublished()); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @test |
||
33 | */ |
||
34 | public function can_instantiate(): void |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @test |
||
41 | */ |
||
42 | public function can_instantiate_many(): void |
||
48 | } |
||
49 | } |
||
50 |