Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Merge f9a8954 into a97fc91
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks3w committed May 1, 2015
2 parents a97fc91 + f9a8954 commit 40a11d3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion library/Zend/Memory/Container/Movable.php
Expand Up @@ -102,7 +102,7 @@ public function unlock()
*/
public function isLocked()
{
return $this->state & self::LOCKED;
return (bool) ($this->state & self::LOCKED);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions tests/ZendTest/Memory/AccessControllerTest.php
Expand Up @@ -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());
}
}
6 changes: 3 additions & 3 deletions tests/ZendTest/Memory/LockedTest.php
Expand Up @@ -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());
}

/**
Expand Down
6 changes: 3 additions & 3 deletions tests/ZendTest/Memory/MovableTest.php
Expand Up @@ -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());
}

/**
Expand Down

0 comments on commit 40a11d3

Please sign in to comment.