Passed
Push — master ( 7dfdd5...21a87f )
by Kevin
02:34
created

UnitTestCase::setUpFoundry()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
namespace Zenstruck\Foundry\Tests;
4
5
use Doctrine\Persistence\ManagerRegistry;
6
use PHPUnit\Framework\TestCase;
7
use Zenstruck\Foundry\Configuration;
8
use Zenstruck\Foundry\Factory;
9
use Zenstruck\Foundry\StoryManager;
10
11
/**
12
 * @author Kevin Bond <[email protected]>
13
 */
14
abstract class UnitTestCase extends TestCase
15
{
16
    /** @var Configuration|null */
17
    protected $configuration;
18
19
    /**
20
     * @before
21
     */
22
    public function setUpFoundry(): void
23
    {
24
        $this->configuration = new Configuration($this->createMock(ManagerRegistry::class), new StoryManager([]));
25
26
        Factory::boot($this->configuration);
27
    }
28
}
29