Passed
Pull Request — master (#1)
by Kevin
06:45
created

UnitTestCase   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 4
c 3
b 0
f 0
dl 0
loc 12
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
    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