protected function setUp() { $config = new Config(__DIR__ . '/../storage', __DIR__ . '/../test_config.json'); $this->container = ContainerFactory::create($config); $this->container['config'] = $config; $this->container['em'] = new EntityManager($this->container['config']); }
/** * @expectedException Simope\Exception\ContainerFactoryException * @expectedExceptionMessage Could not create instance of Container class */ public function testCantCreateException() { $config = new Config(__DIR__ . '/../storage', __DIR__ . '/../test_config.json'); $config->set('container_class', 'nonexistingclass'); try { ContainerFactory::create($config); } catch (Exception $e) { return; } $this->fail('An expected exception has not been raised.'); }