public function LockBackendAbstractTest::testWaitTrue in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php \Drupal\Tests\Core\Lock\LockBackendAbstractTest::testWaitTrue()
- 10 core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php \Drupal\Tests\Core\Lock\LockBackendAbstractTest::testWaitTrue()
Tests the wait() method when lockMayBeAvailable() returns FALSE.
Waiting could take 1 second so we need to extend the possible runtime. @medium
File
- core/
tests/ Drupal/ Tests/ Core/ Lock/ LockBackendAbstractTest.php, line 42
Class
- LockBackendAbstractTest
- @coversDefaultClass \Drupal\Tests\Core\Lock\LockBackendAbstractTest @group Lock
Namespace
Drupal\Tests\Core\LockCode
public function testWaitTrue() {
$this->lock
->expects($this
->any())
->method('lockMayBeAvailable')
->with($this
->equalTo('test_name'))
->will($this
->returnValue(FALSE));
$this
->assertTrue($this->lock
->wait('test_name', 1));
}