Total Complexity | 5 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class TestState implements BaseState |
||
9 | { |
||
10 | public function setUp(SapphireTest $test): void |
||
11 | { |
||
12 | $this->disableTopPageUpdate(); |
||
13 | } |
||
14 | |||
15 | public function tearDown(SapphireTest $test): void |
||
16 | { |
||
17 | } |
||
18 | |||
19 | public function setUpOnce($class): void |
||
20 | { |
||
21 | $this->disableTopPageUpdate(); |
||
22 | } |
||
23 | |||
24 | public function tearDownOnce($class): void |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * We need to disable top page updates as it doesn't work with fixture builder and transactions in unit tests |
||
30 | * caused by an attempt to traverse unsaved relations which is normally fine |
||
31 | * the lookup failure causes the whole transaction to fail which is the whole unit test |
||
32 | * this has no impact on the functionality, though |
||
33 | */ |
||
34 | private function disableTopPageUpdate(): void |
||
41 |