Passed
Pull Request — master (#1)
by Kevin
02:38
created

UnitTestCase   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 4
Bugs 0 Features 0
Metric Value
eloc 4
c 4
b 0
f 0
dl 0
loc 13
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A setUpFoundry() 0 5 1
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