Initial commit
This commit is contained in:
18
tests/Lock/FileLockTest.php
Normal file
18
tests/Lock/FileLockTest.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace NoccyLabs\Ipc\Lock;
|
||||
|
||||
|
||||
class FileLockTest extends \PhpUnit\Framework\TestCase
|
||||
{
|
||||
|
||||
public function testTheLockingShouldBeExclusive()
|
||||
{
|
||||
$lock1 = new FileLock(__FILE__);
|
||||
$lock2 = new FileLock(__FILE__);
|
||||
|
||||
$this->assertEquals(true, $lock1->acquire(0));
|
||||
$this->assertEquals(false, $lock2->acquire(0));
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user