Replaced phpunit mocks of exception with concretions so they will work in hhvm

This commit is contained in:
Andy Wendt 2015-02-03 08:45:28 -07:00
commit c2cef0d8f4
2 changed files with 12 additions and 2 deletions

View file

@ -3,11 +3,21 @@ namespace Respect\Validation\Exceptions;
use Respect\Validation\Validator as v;
/**
* Class PrivateAbstractNestedException
* @package Respect\Validation\Exceptions
* phpunit has an issue with mocking exceptions when in HHVM:
* https://github.com/sebastianbergmann/phpunit-mock-objects/issues/207
*/
class PrivateAbstractNestedException extends AbstractNestedException
{
}
class AbstractNestedExceptionTest extends \PHPUnit_Framework_TestCase
{
public function testItImplementsNestedValidationExceptionInterface()
{
$abstractNestedException = $this->getMock('Respect\Validation\Exceptions\AbstractNestedException');
$abstractNestedException = new PrivateAbstractNestedException();
$this->assertInstanceOf('Respect\Validation\Exceptions\NestedValidationExceptionInterface',
$abstractNestedException);
}