public function __construct($path = null, $file = null) { parent::__construct(null, null); }
public function xtest_lockExists() { $dir = dirname(__FILE__) . '/files/rw/'; $file = __FUNCTION__ . '.lock'; $firstLock = new cs_lockfile($dir, $file); $secondLock = new cs_lockfile($dir, $file); $this->assertFalse(file_exists($file)); $this->assertFalse($firstLock->is_lockfile_present()); $this->assertFalse($secondLock->is_lockfile_present()); $this->assertTrue((bool) $firstLock->create_lockfile()); $this->assertTrue(file_exists($file)); $this->assertTrue($firstLock->is_lockfile_present()); $this->assertTrue($secondLock->is_lockfile_present()); $this->assertTrue($secondLock->delete_lockfile()); $this->assertFalse($firstLock->delete_lockfile()); }