Skip to content

Commit 99f5351

Browse files
committed
Added another test.
Signed-off-by: alexmerlin <alex.merlin.1985@gmail.com>
1 parent 847ef13 commit 99f5351

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

test/FileLockerTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,17 @@ public function testWillNotUnlockWithoutValidCommandName(): void
134134
$this->assertNull($fileLocker->getLockFile());
135135
}
136136

137+
public function testWillNotUnlockWhenEnabledAndWithoutValidCommandName(): void
138+
{
139+
$config = $this->getConfig();
140+
141+
$fileLocker = new FileLocker(true, $config['dirPath']);
142+
$this->assertNull($fileLocker->getLockFile());
143+
$fileLocker->unlock();
144+
$this->assertInstanceOf(FileLocker::class, $fileLocker);
145+
$this->assertNull($fileLocker->getLockFile());
146+
}
147+
137148
/**
138149
* @throws Exception
139150
*/

0 commit comments

Comments
 (0)