diff --git a/library/Zend/Memory/Container/Movable.php b/library/Zend/Memory/Container/Movable.php index c5d12976255..68ec50acef3 100644 --- a/library/Zend/Memory/Container/Movable.php +++ b/library/Zend/Memory/Container/Movable.php @@ -102,7 +102,7 @@ public function unlock() */ public function isLocked() { - return $this->state & self::LOCKED; + return (bool) ($this->state & self::LOCKED); } /** diff --git a/tests/ZendTest/Memory/AccessControllerTest.php b/tests/ZendTest/Memory/AccessControllerTest.php index db21b4f7166..fae09d65c31 100644 --- a/tests/ZendTest/Memory/AccessControllerTest.php +++ b/tests/ZendTest/Memory/AccessControllerTest.php @@ -79,9 +79,9 @@ public function testLock() $this->assertFalse((bool) $memObject->isLocked()); $memObject->lock(); - $this->assertTrue((bool) $memObject->isLocked()); + $this->assertTrue($memObject->isLocked()); $memObject->unlock(); - $this->assertFalse((bool) $memObject->isLocked()); + $this->assertFalse($memObject->isLocked()); } } diff --git a/tests/ZendTest/Memory/LockedTest.php b/tests/ZendTest/Memory/LockedTest.php index 20de2c2246c..00fd8b96f3d 100644 --- a/tests/ZendTest/Memory/LockedTest.php +++ b/tests/ZendTest/Memory/LockedTest.php @@ -58,14 +58,14 @@ public function testLock() $memObject = new Container\Locked('0123456789'); // It's always locked - $this->assertTrue((bool) $memObject->isLocked()); + $this->assertTrue($memObject->isLocked()); $memObject->lock(); - $this->assertTrue((bool) $memObject->isLocked()); + $this->assertTrue($memObject->isLocked()); $memObject->unlock(); // It's always locked - $this->assertTrue((bool) $memObject->isLocked()); + $this->assertTrue($memObject->isLocked()); } /** diff --git a/tests/ZendTest/Memory/MovableTest.php b/tests/ZendTest/Memory/MovableTest.php index 2e4cf3c2f29..1a9567eda58 100644 --- a/tests/ZendTest/Memory/MovableTest.php +++ b/tests/ZendTest/Memory/MovableTest.php @@ -62,13 +62,13 @@ public function testLock() $memoryManager = new DummyMemoryManager(); $memObject = new Container\Movable($memoryManager, 10, '0123456789'); - $this->assertFalse((bool) $memObject->isLocked()); + $this->assertFalse($memObject->isLocked()); $memObject->lock(); - $this->assertTrue((bool) $memObject->isLocked()); + $this->assertTrue($memObject->isLocked()); $memObject->unlock(); - $this->assertFalse((bool) $memObject->isLocked()); + $this->assertFalse($memObject->isLocked()); } /**