mirror of
https://github.com/Respect/Validation.git
synced 2026-03-17 23:59:51 +01:00
Replaced phpunit mocks of exception with concretions so they will work in hhvm
This commit is contained in:
parent
84375f436d
commit
c2cef0d8f4
2 changed files with 12 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue