PHP 7.2 버전용으로 올림!

This commit is contained in:
2018-06-21 02:17:31 +09:00
parent c1a6dd385a
commit b402846d43
70 changed files with 377 additions and 2115 deletions
+14
View File
@@ -97,6 +97,20 @@ class LockTest extends TestCase
$lock->refresh();
}
public function testRefreshCustom()
{
$key = new Key(uniqid(__METHOD__, true));
$store = $this->getMockBuilder(StoreInterface::class)->getMock();
$lock = new Lock($key, $store, 10);
$store
->expects($this->once())
->method('putOffExpiration')
->with($key, 20);
$lock->refresh(20);
}
public function testIsAquired()
{
$key = new Key(uniqid(__METHOD__, true));
+1 -6
View File
@@ -31,6 +31,7 @@ trait BlockingStoreTestTrait
* This test is time sensible: the $clockDelay could be adjust.
*
* @requires extension pcntl
* @requires extension posix
* @requires function pcntl_sigwaitinfo
*/
public function testBlockingLocks()
@@ -38,12 +39,6 @@ trait BlockingStoreTestTrait
// Amount a microsecond used to order async actions
$clockDelay = 50000;
if (\PHP_VERSION_ID < 50600 || defined('HHVM_VERSION_ID')) {
$this->markTestSkipped('The PHP engine does not keep resource in child forks');
return;
}
/** @var StoreInterface $store */
$store = $this->getStore();
$key = new Key(uniqid(__METHOD__, true));
@@ -27,10 +27,6 @@ class SemaphoreStoreTest extends AbstractStoreTest
*/
protected function getStore()
{
if (\PHP_VERSION_ID < 50601) {
$this->markTestSkipped('Non blocking semaphore are supported by PHP version greater or equals than 5.6.1');
}
return new SemaphoreStore();
}
}