public function testAddGetNamedNativeQuery() { $sql = 'SELECT * FROM user'; $rsm = $this->getMock('Doctrine\\ORM\\Query\\ResultSetMapping'); $this->configuration->addNamedNativeQuery('QueryName', $sql, $rsm); $fetched = $this->configuration->getNamedNativeQuery('QueryName'); $this->assertSame($sql, $fetched[0]); $this->assertSame($rsm, $fetched[1]); $this->setExpectedException('Doctrine\\ORM\\ORMException'); $this->configuration->getNamedQuery('NonExistingQuery'); }
/** * {@inheritDoc} */ public function createNamedQuery($name) { return $this->createQuery($this->config->getNamedQuery($name)); }