Passed
Pull Request — master (#11)
by Laurens
01:56
created

MockeryAssertionTrait::setUp()   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 LauLamanApps\IzettleApi\Tests\Unit;
4
5
use Mockery;
6
7
trait MockeryAssertionTrait
8
{
9
    public function setUp(): void
10
    {
11
        parent::setUp();
12
        Mockery::resetContainer();
13
    }
14
15
    public function tearDown(): void
16
    {
17
        parent::tearDown();
18
        if ($container = Mockery::getContainer()) {
19
            $this->addToAssertionCount($container->mockery_getExpectationCount());
20
        }
21
        Mockery::close();
22
    }
23
24
    abstract public function addToAssertionCount($count);
25
}
26