These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace DoctrineModuleTest; |
||
6 | |||
7 | use DoctrineModule\ConfigProvider; |
||
8 | use PHPUnit\Framework\TestCase; |
||
9 | use function serialize; |
||
10 | use function unserialize; |
||
11 | |||
12 | /** |
||
13 | * Tests used to ensure ConfigProvider operates as expected |
||
14 | * |
||
15 | * @link http://www.doctrine-project.org/ |
||
16 | */ |
||
17 | class ConfigProviderTest extends TestCase |
||
18 | { |
||
19 | public function testInvokeHasCorrectKeys() : void |
||
20 | { |
||
21 | $config = (new ConfigProvider())->__invoke(); |
||
22 | |||
23 | self::assertIsArray($config); |
||
0 ignored issues
–
show
|
|||
24 | |||
25 | self::assertArrayHasKey('doctrine', $config, 'Expected config to have "doctrine" array key'); |
||
26 | self::assertArrayHasKey( |
||
27 | 'doctrine_factories', |
||
28 | $config, |
||
29 | 'Expected config to have "doctrine_factories" array key' |
||
30 | ); |
||
31 | self::assertArrayHasKey('dependencies', $config, 'Expected config to have "dependencies" array key'); |
||
32 | self::assertArrayHasKey('controllers', $config, 'Expected config to have "controllers" array key'); |
||
33 | self::assertArrayHasKey('route_manager', $config, 'Expected config to have "route_manager" array key'); |
||
34 | self::assertArrayHasKey('console', $config, 'Expected config to have "console" array key'); |
||
35 | |||
36 | // Config Provider should not have service_manager key; should only exist in ZF Module |
||
37 | self::assertArrayNotHasKey('service_manager', $config, 'Config should not have "service_manager" array key'); |
||
38 | |||
39 | self::assertSame($config, unserialize(serialize($config))); |
||
40 | } |
||
41 | } |
||
42 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.