/** * Test creating and getting an entity manager * * @return void * @author Dan Cox */ public function test_createEntityManager() { $conn = new Connection(__DIR__); $em = $conn->load($this->config)->create(); $this->assertInstanceOf('\\Doctrine\\ORM\\EntityManager', $em); $this->assertInstanceOf('\\Doctrine\\ORM\\EntityManager', Connection::getEntity()); }
/** * Create a connection and inject to database class * * @return void * @author Dan Cox */ public function test_entity() { $this->database->setEntity(Connection::getEntity()); $this->database->setModel('Users'); $this->assertInstanceOf('\\Doctrine\\ORM\\EntityManager', $this->database->getEntity()); $this->assertEquals('Users', $this->database->getModel()); }
/** * Grab the default entity from the Connection class * * @return void * @author Dan Cox */ public function __construct() { $this->entity = Connection::getEntity(); }