1 | <?php |
||
26 | abstract class AbstractEntityManagerTest extends TestCase |
||
27 | { |
||
28 | use RpcRequestTrait; |
||
29 | |||
30 | const DEFAULT_CLIENT = 'test-client'; |
||
31 | /** @var ClientRegistryInterface */ |
||
32 | private $clientRegistry; |
||
33 | /** @var ApiEntityManager */ |
||
34 | private $manager; |
||
35 | /** @var RpcMockClient[] */ |
||
36 | private $clients = []; |
||
37 | /** @var ApiFactoryRegistryInterface */ |
||
38 | private $factoryRegistry; |
||
39 | |||
40 | /** |
||
41 | * @return mixed |
||
42 | */ |
||
43 | public function getClientRegistry() |
||
47 | |||
48 | /** |
||
49 | * @return ApiEntityManager |
||
50 | */ |
||
51 | protected function getManager() |
||
55 | |||
56 | protected function setUp() |
||
61 | |||
62 | protected function createEntityManager($clients = [self::DEFAULT_CLIENT]) |
||
82 | |||
83 | /** |
||
84 | * @param string $name |
||
85 | * |
||
86 | * @return RpcMockClient |
||
87 | */ |
||
88 | protected function getClient($name = self::DEFAULT_CLIENT) |
||
96 | |||
97 | protected function getClientNames() |
||
101 | |||
102 | protected function tearDown() |
||
112 | |||
113 | /** |
||
114 | * @return Configuration |
||
115 | */ |
||
116 | protected function createConfiguration() |
||
117 | { |
||
118 | $configuration = new Configuration(); |
||
119 | $configuration->setMetadataFactory(new EntityMetadataFactory()); |
||
|
|||
120 | $configuration->setClientRegistry($this->clientRegistry); |
||
121 | $configuration->setTypeRegistry(new BaseTypeRegistry(new TypeRegistry())); |
||
122 | $configuration->setFactoryRegistry($this->factoryRegistry); |
||
123 | $configuration->setProxyDir(CACHE_DIR.'/doctrine/proxy/'); |
||
124 | $configuration->setProxyNamespace('Bankiru\Api\Doctrine\Test\Proxy'); |
||
125 | $driver = new MappingDriverChain(); |
||
126 | $driver->addDriver( |
||
127 | new YmlMetadataDriver( |
||
128 | new SymfonyFileLocator( |
||
129 | [ |
||
130 | __DIR__.'/../Test/Resources/config/api/' => 'Bankiru\Api\Doctrine\Test\Entity', |
||
131 | ], |
||
132 | '.api.yml', |
||
133 | DIRECTORY_SEPARATOR |
||
134 | ) |
||
135 | ), |
||
136 | 'Bankiru\Api\Doctrine\Test\Entity' |
||
137 | ); |
||
138 | $configuration->setDriver($driver); |
||
139 | |||
140 | return $configuration; |
||
141 | } |
||
142 | |||
143 | protected function getFactoryApis() |
||
147 | } |
||
148 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: