Total Complexity | 2 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
15 | trait TestWithTransactionAndUser |
||
16 | { |
||
17 | use TestWithTransaction { |
||
18 | setUp as traitSetupWithTransaction; |
||
19 | tearDown as traitTearDownWithTransaction; |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * Start transaction |
||
24 | */ |
||
25 | public function setUp(): void |
||
26 | { |
||
27 | $this->traitSetupWithTransaction(); |
||
28 | User::setCurrent(null); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Cancel transaction, to undo all changes made |
||
33 | */ |
||
34 | public function tearDown(): void |
||
43 | } |
||
44 | } |
||
45 |