Skip to content

Commit 57afc99

Browse files
committed
add unit tests for non-writable path check with is_really_writable
1 parent 45baf39 commit 57afc99

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/system/Cache/Handlers/FileHandlerTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ public function testNew()
6565
$this->assertInstanceOf(FileHandler::class, $this->fileHandler);
6666
}
6767

68+
/**
69+
* @expectedException \CodeIgniter\Cache\Exceptions\CacheException
70+
*/
71+
public function testNewWithNonWritablePath()
72+
{
73+
chmod($this->config->storePath, 0444);
74+
new FileHandler($this->config);
75+
}
76+
6877
public function testSetDefaultPath()
6978
{
7079
//Initialize path

0 commit comments

Comments
 (0)