"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/framework/mutex/MutexTestTrait.php" between
yii2-2.0.35.tar.gz and yii2-2.0.36.tar.gz

About: Yii 2 is a high-performance component-based PHP framework for developing large-scale Web applications (source).

MutexTestTrait.php  (yii2-2.0.35):MutexTestTrait.php  (yii2-2.0.36)
skipping to change at line 87 skipping to change at line 87
$this->assertTrue($mutexOne->acquire($mutexName)); $this->assertTrue($mutexOne->acquire($mutexName));
$microtime = microtime(true); $microtime = microtime(true);
$this->assertFalse($mutexTwo->acquire($mutexName, 1)); $this->assertFalse($mutexTwo->acquire($mutexName, 1));
$diff = microtime(true) - $microtime; $diff = microtime(true) - $microtime;
$this->assertTrue($diff >= 1 && $diff < 2); $this->assertTrue($diff >= 1 && $diff < 2);
$this->assertTrue($mutexOne->release($mutexName)); $this->assertTrue($mutexOne->release($mutexName));
$this->assertFalse($mutexTwo->release($mutexName)); $this->assertFalse($mutexTwo->release($mutexName));
} }
/**
* @dataProvider mutexDataProvider()
*
* @param string $mutexName
*/
public function testMutexIsAcquired($mutexName)
{
$mutexOne = $this->createMutex();
$mutexTwo = $this->createMutex();
$this->assertFalse($mutexOne->isAcquired($mutexName));
$this->assertTrue($mutexOne->acquire($mutexName));
$this->assertTrue($mutexOne->isAcquired($mutexName));
$this->assertFalse($mutexTwo->isAcquired($mutexName));
$this->assertTrue($mutexOne->release($mutexName));
$this->assertFalse($mutexOne->isAcquired($mutexName));
$this->assertFalse($mutexOne->isAcquired('non existing'));
}
public static function mutexDataProvider() public static function mutexDataProvider()
{ {
$utf = <<<'UTF' $utf = <<<'UTF'
๐˜ห›๐œ„ ำ๐•ค ๐—ฎ ๐”ฃ๐–บ๐‘ˆ๐‰, ๐‘ˆโ„ฏ๐” ๏ฝ•๐’“๐—ฒ, ๐ฐ๐žน๐’น ๐–Š๐˜ง๐’‡๐—ถ๐•”๐–Žโ…‡ฯ€ฯ„ ๏ผฐ๐˜๐™ฟ ๐–ฟะณ๐–บ๏ฝ๐–พ๏ฝ—ฯƒ๏ฝ’๐ค. ๐˜ห›๐œ„ ำ๐•ค ๐—ฎ ๐”ฃ๐–บ๐‘ˆ๐‰, ๐‘ˆโ„ฏ๐” ๏ฝ•๐’“๐—ฒ, ๐ฐ๐žน๐’น ๐–Š๐˜ง๐’‡๐—ถ๐•”๐–Žโ…‡ฯ€ฯ„ ๏ผฐ๐˜๐™ฟ ๐–ฟะณ๐–บ๏ฝ๐–พ๏ฝ—ฯƒ๏ฝ’๐ค.
๐“•lะต๐˜…ำแlะต ๐žฌ๐–พ๐˜ ฯฑ๐˜ณษ‘๐–Œ๏ฝ๐›ผ๐“‰อบ๐–ผ. ๐“•lะต๐˜…ำแlะต ๐žฌ๐–พ๐˜ ฯฑ๐˜ณษ‘๐–Œ๏ฝ๐›ผ๐“‰อบ๐–ผ.
๐‘Š๏ฎญ๐š›๐›ž๐“ผ ๐”ฏ๐•š๐•˜าป๐žƒ ฯƒ๐šž๐žฝ เฅฆ๐’‡ ๐ญ๐™าฝ ๐—ฏ๐˜ฐ๐˜น. ๐‘Š๏ฎญ๐š›๐›ž๐“ผ ๐”ฏ๐•š๐•˜าป๐žƒ ฯƒ๐šž๐žฝ เฅฆ๐’‡ ๐ญ๐™าฝ ๐—ฏ๐˜ฐ๐˜น.
๐“—๐šŠ๐˜€ ๐“‡๐–พ๐™–๐ฌ๏ปฌ๐“ƒ๐•’แ–ฏl๐”ข ๊“’๐˜ฆึ„ฮฑ๐—Žl๐ญ๊œฑ. ๐“—๐šŠ๐˜€ ๐“‡๐–พ๐™–๐ฌ๏ปฌ๐“ƒ๐•’แ–ฏl๐”ข ๊“’๐˜ฆึ„ฮฑ๐—Žl๐ญ๊œฑ.
๐Ÿ˜ฑ ๐Ÿ˜ฑ
UTF; UTF;
 End of changes. 1 change blocks. 
0 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)