Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
18 | public function testCreate(): void |
||
19 | { |
||
20 | // @phpstan-ignore argument.type |
||
21 | $factory = new ContainerSuiteFactory([ |
||
22 | new static(), |
||
23 | new \stdClass(), |
||
24 | ]); |
||
25 | $this->assertType(static::class, $factory->create(static::class)); |
||
26 | $this->assertThrowsException(function () use ($factory) { |
||
27 | $factory->create(\stdClass::class); |
||
28 | }, InvalidTestCaseException::class, "stdClass is not a descendant of MyTester\\TestCase."); |
||
29 | $this->assertThrowsException(function () use ($factory) { |
||
30 | // @phpstan-ignore argument.type |
||
31 | $factory->create("abcd"); |
||
32 | }, InvalidTestCaseException::class, "abcd is not a descendant of MyTester\\TestCase."); |
||
33 | } |
||
35 |