We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||
8 | class InheritanceProcessorTest extends TestCase |
||
9 | { |
||
10 | private $fixtures = [ |
||
11 | 'foo' => [InheritanceProcessor::INHERITS_KEY => ['bar', 'baz'], 'type' => 'object', 'config' => []], |
||
12 | 'bar' => [InheritanceProcessor::INHERITS_KEY => ['toto'], 'type' => 'object', 'config' => []], |
||
13 | 'baz' => ['type' => 'object', 'config' => []], |
||
14 | 'toto' => ['type' => 'interface', 'config' => []], |
||
15 | 'tata' => ['type' => 'interface', InheritanceProcessor::HEIRS_KEY => ['foo'], 'config' => []], |
||
16 | ]; |
||
17 | |||
18 | /** |
||
19 | * @expectedException \InvalidArgumentException |
||
20 | * @expectedExceptionMessage Type "toto" inherits by "bar" not found. |
||
21 | */ |
||
22 | public function testExtendsUnknownType() |
||
29 | |||
30 | /** |
||
31 | * @expectedException \InvalidArgumentException |
||
32 | * @expectedExceptionMessage Type "foo" child of "tata" not found. |
||
33 | */ |
||
34 | public function testHeirsUnknownType() |
||
41 | |||
42 | /** |
||
43 | * @expectedException \InvalidArgumentException |
||
44 | * @expectedExceptionMessage Type circular inheritance detected (foo->bar->toto->foo). |
||
45 | */ |
||
46 | public function testCircularExtendsType() |
||
53 | |||
54 | /** |
||
55 | * @expectedException \InvalidArgumentException |
||
56 | * @expectedExceptionMessage Type "toto" can't inherits "bar" because "enum" is not allowed type (["object","interface"]). |
||
57 | */ |
||
58 | public function testNotAllowedType() |
||
65 | } |
||
66 |