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:
parent
a353cb81a3
commit
a4379cc9e2
@ -136,6 +136,7 @@ class ConfigurationTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->configuration->addNamedQuery('QueryName', $dql);
|
$this->configuration->addNamedQuery('QueryName', $dql);
|
||||||
$this->assertSame($dql, $this->configuration->getNamedQuery('QueryName'));
|
$this->assertSame($dql, $this->configuration->getNamedQuery('QueryName'));
|
||||||
$this->expectException(\Doctrine\ORM\ORMException::class);
|
$this->expectException(\Doctrine\ORM\ORMException::class);
|
||||||
|
$this->expectExceptionMessage('a named query');
|
||||||
$this->configuration->getNamedQuery('NonExistingQuery');
|
$this->configuration->getNamedQuery('NonExistingQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,7 +149,8 @@ class ConfigurationTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertSame($sql, $fetched[0]);
|
$this->assertSame($sql, $fetched[0]);
|
||||||
$this->assertSame($rsm, $fetched[1]);
|
$this->assertSame($rsm, $fetched[1]);
|
||||||
$this->expectException(\Doctrine\ORM\ORMException::class);
|
$this->expectException(\Doctrine\ORM\ORMException::class);
|
||||||
$this->configuration->getNamedQuery('NonExistingQuery');
|
$this->expectExceptionMessage('a named native query');
|
||||||
|
$this->configuration->getNamedNativeQuery('NonExistingQuery');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user