Expect a more specific PropertyAccess exception
RuntimeException is the nearest common ancestor of the PropertyAccessDeniedException (removed in 2.3) and NoSuchPropertyException. See: symfony/symfony@2a666cb7c3
This commit is contained in:
parent
64d27c37fa
commit
ee6f3cb04d
|
@ -201,10 +201,11 @@ class ModelToElasticaAutoTransformerTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertTrue(array_key_exists('nullValue', $data));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException Symfony\Component\PropertyAccess\Exception\RuntimeException
|
||||
*/
|
||||
public function testThatCannotTransformObjectWhenGetterDoesNotExistForPrivateMethod()
|
||||
{
|
||||
$this->setExpectedException('Symfony\Component\PropertyAccess\Exception\ExceptionInterface');
|
||||
|
||||
$transformer = $this->getTransformer();
|
||||
$transformer->transform(new POPO(), array('desc' => array()));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue