public function testInitRepo() { $config = $this->getMock('Doctrine\\ORM\\Configuration'); $config->expects($this->any())->method('addCustomStringFunction'); $om = $this->getMockBuilder('Doctrine\\ORM\\EntityManager')->disableOriginalConstructor()->getMock(); $om->expects($this->once())->method('getConfiguration')->will($this->returnValue($config)); $classMetadata = $this->getMockBuilder('Doctrine\\ORM\\Mapping\\ClassMetadata')->disableOriginalConstructor()->getMock(); $driver = new PdoMysql(); $driver->initRepo($om, $classMetadata); }
public function testCreateIndexes() { $this->connection->expects($this->once())->method('query')->with(PdoMysql::getPlainSql()); $this->indexManager->createIndexes(); }