Skip to content

Commit

Permalink
Merge pull request #187 from beberlei/rquadling-patch-1
Browse files Browse the repository at this point in the history
Update LazyAssertionException.php
  • Loading branch information
rquadling authored Dec 2, 2016
2 parents dd69bfe + 6643457 commit 68ed136
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Assert/LazyAssertionException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Assert;

class LazyAssertionException extends \InvalidArgumentException
class LazyAssertionException extends InvalidArgumentException
{
/**
* @var InvalidArgumentException[]
Expand All @@ -38,7 +38,7 @@ public static function fromErrors(array $errors)

public function __construct($message, array $errors)
{
parent::__construct($message, 0);
parent::__construct($message, 0, null, null);

$this->errors = $errors;
}
Expand Down
10 changes: 10 additions & 0 deletions tests/Assert/Tests/LazyAssertionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,14 @@ public function provideDataToTestThatSetExceptionClassWillNotAcceptInvalidExcept
'other exception' => array('Exception'),
);
}

public function testLazyAssertionExceptionExtendsInvalidArgumentException()
{
$this->setExpectedException('\Assert\InvalidArgumentException');

Assert::lazy()->tryAll()
->that(10, 'foo')->float()->greaterThan(100)
->that(null, 'foo')->notEmpty()->string()
->verifyNow();
}
}

0 comments on commit 68ed136

Please sign in to comment.