コード例 #1
0
 public function test_object_manager_is_shared_in_the_container()
 {
     $factory = new AppFactory();
     $app = $factory->createApp();
     $app->start();
     $this->assertTrue($app->getContainer()->get(ObjectManager::class) instanceof ObjectManager);
     $this->assertTrue($app->getContainer()->get(EntityManager::class) instanceof EntityManager);
     $this->assertTrue($app->getContainer()->get(EntityManagerInterface::class) instanceof EntityManagerInterface);
 }
コード例 #2
0
 private function createApp()
 {
     $factory = new AppFactory();
     return $factory->createApp();
 }