From a945a1d6db03f261f1f333b6e92a909780623564 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Fri, 13 Jun 2014 12:01:19 +0200 Subject: [PATCH] Fixed misleading isFalse and isTrue in Assert --- src/Assert.php | 4 ++-- tests/Tests/JobTests/AcceptUserRegistrationJobTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Assert.php b/src/Assert.php index 8b59d660..c25ff3ea 100644 --- a/src/Assert.php +++ b/src/Assert.php @@ -49,12 +49,12 @@ class Assert public function isTrue($actual) { - return $this->areEqual(1, intval(boolval($actual))); + return $this->areEqual(true, $actual); } public function isFalse($actual) { - return $this->areEqual(0, intval(boolval($actual))); + return $this->areEqual(false, $actual); } public function areEqual($expected, $actual) diff --git a/tests/Tests/JobTests/AcceptUserRegistrationJobTest.php b/tests/Tests/JobTests/AcceptUserRegistrationJobTest.php index f6cead59..b98061ca 100644 --- a/tests/Tests/JobTests/AcceptUserRegistrationJobTest.php +++ b/tests/Tests/JobTests/AcceptUserRegistrationJobTest.php @@ -6,7 +6,7 @@ class AcceptUserRegistrationJobTest extends AbstractTest $this->grantAccess('acceptUserRegistration'); $user = $this->userMocker->mockSingle(); - $this->assert->isFalse($user->isStaffConfirmed()); + $this->assert->isNull($user->isStaffConfirmed()); $user = $this->assert->doesNotThrow(function() use ($user) {