Total Complexity | 3 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class PropertyTest extends KernelTestCase |
||
10 | { |
||
11 | /** |
||
12 | * @var Property|object|null |
||
13 | */ |
||
14 | private $property; |
||
15 | |||
16 | protected function setUp(): void |
||
17 | { |
||
18 | self::bootKernel(); |
||
19 | $em = static::$container->get('doctrine.orm.default_entity_manager'); |
||
20 | $this->property = new Property($em); |
||
|
|||
21 | } |
||
22 | |||
23 | /** |
||
24 | * @test |
||
25 | * @dataProvider doctrineTypes |
||
26 | */ |
||
27 | public function generated_faker_method(string $doctrineType) |
||
28 | { |
||
29 | $createdFakerMethodAsString = $this->property->createFakerMethodFromDoctrineType($doctrineType); |
||
30 | |||
31 | $this->assertEquals(DoctrineTypes::DOCTRINE_TYPES[$doctrineType], $createdFakerMethodAsString); |
||
32 | } |
||
33 | |||
34 | public function doctrineTypes() |
||
59 | ]; |
||
60 | } |
||
61 | } |
||
62 |