Completed
Pull Request — master (#335)
by Simon
04:45
created

DatabaseTestCaseTrait::rollbackTransactionAfter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace ShopwarePlugins\Connect\Tests;
4
5
trait DatabaseTestCaseTrait
6
{
7
    /**
8
     * @before
9
     */
10
    protected function startTransactionBefore()
11
    {
12
        $connection = Shopware()->Container()->get('dbal_connection');
13
        $connection->beginTransaction();
14
    }
15
16
    /**
17
     * @after
18
     */
19
    protected function rollbackTransactionAfter()
20
    {
21
        $connection = Shopware()->Container()->get('dbal_connection');
22
        $connection->rollBack();
23
    }
24
}