示例#1
0
 public function testRegisterToContainer()
 {
     $config = new TestPackage();
     $this->containerSvc->registerToContainer($config);
     $paths = $this->containerSvc->getEntityPaths();
     $this->assertContains('vendor/random/src/Entity', $paths);
     $this->assertEquals('A boring old string.', $this->containerSvc->getContainer()['test.package']);
 }
示例#2
0
 public function testSetProxyPaths()
 {
     $this->containerSvc->setProxyPath('/path/to/proxies');
     // Initialise container
     $this->containerSvc->getContainer();
     $reflection = new ReflectionClass('Del\\Common\\ContainerService');
     $property = $reflection->getProperty('proxyPath');
     $property->setAccessible(true);
     $proxyPath = $property->getValue($this->containerSvc);
     $this->assertTrue(is_string($proxyPath));
     $this->assertEquals('/path/to/proxies', $proxyPath);
 }