1
0
mirror of synced 2025-02-02 21:41:45 +03:00

Fixes named native query test

- Makes sure the correct method is called in the test
- Verifies that the correct method is called by checking the exception message
This commit is contained in:
Arjan 2016-10-13 22:54:32 +02:00
parent a353cb81a3
commit a4379cc9e2

View File

@ -136,6 +136,7 @@ class ConfigurationTest extends PHPUnit_Framework_TestCase
$this->configuration->addNamedQuery('QueryName', $dql);
$this->assertSame($dql, $this->configuration->getNamedQuery('QueryName'));
$this->expectException(\Doctrine\ORM\ORMException::class);
$this->expectExceptionMessage('a named query');
$this->configuration->getNamedQuery('NonExistingQuery');
}
@ -148,7 +149,8 @@ class ConfigurationTest extends PHPUnit_Framework_TestCase
$this->assertSame($sql, $fetched[0]);
$this->assertSame($rsm, $fetched[1]);
$this->expectException(\Doctrine\ORM\ORMException::class);
$this->configuration->getNamedQuery('NonExistingQuery');
$this->expectExceptionMessage('a named native query');
$this->configuration->getNamedNativeQuery('NonExistingQuery');
}
/**