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:
Jeremy Mikola 2013-05-02 11:24:27 -04:00
parent 64d27c37fa
commit ee6f3cb04d

View file

@ -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()));
}