Passed
Pull Request — master (#1)
by Kevin
06:45
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
    protected ?Configuration $configuration = null;
17
18
    /**
19
     * @before
20
     */
21
    public function setUpFoundry(): void
22
    {
23
        $this->configuration = new Configuration($this->createMock(ManagerRegistry::class), new StoryManager([]));
24
25
        Factory::boot($this->configuration);
26
    }
27
}
28