/
GeneralTypeTest.php
55 lines (49 loc) · 2.36 KB
/
GeneralTypeTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
declare(strict_types=1);
namespace Type;
use PHPStan\Testing\TypeInferenceTestCase;
class GeneralTypeTest extends TypeInferenceTestCase
{
/**
* @return iterable<mixed>
*/
public function dataFileAsserts(): iterable
{
yield from $this->gatherAssertTypes(__DIR__.'/data/request-object.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/eloquent-builder.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/paginator-extension.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/model-properties.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/model-properties-relations.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/route.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/conditionable.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/translate.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/model-factories.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/environment-helper.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/view.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/bug-1346.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/request-header.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/optional-helper.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/abstract-manager.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/facades.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/where-relation.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/validator.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/form-request.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/database-transaction.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/container-array-access.php');
yield from $this->gatherAssertTypes(__DIR__.'/data/view-exists.php');
}
/**
* @dataProvider dataFileAsserts
*/
public function testFileAsserts(
string $assertType,
string $file,
...$args
): void {
$this->assertFileAsserts($assertType, $file, ...$args);
}
public static function getAdditionalConfigFiles(): array
{
return [__DIR__.'/data/config-with-migrations.neon'];
}
}