mirror of
https://github.com/adlawson/php-vfs.git
synced 2024-11-24 21:57:40 +00:00
Test basic node permissions
This commit is contained in:
parent
d814160c77
commit
51158ae8e1
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
namespace Vfs\Stream\StreamWrapper;
|
||||
|
||||
use Vfs\Test\AcceptanceTestCase;
|
||||
|
||||
class PermissionAcceptanceTest extends AcceptanceTestCase
|
||||
{
|
||||
protected $tree = [
|
||||
'foo' => [
|
||||
'bar' => 'baz'
|
||||
]
|
||||
];
|
||||
|
||||
public function testDirIsReadable()
|
||||
{
|
||||
$this->assertTrue(is_readable("$this->scheme:///foo"));
|
||||
}
|
||||
|
||||
public function testDirIsWritable()
|
||||
{
|
||||
$this->assertTrue(is_writable("$this->scheme:///foo"));
|
||||
}
|
||||
|
||||
public function testDirIsExecutable()
|
||||
{
|
||||
// Directory can't be executable
|
||||
$this->assertFalse(is_executable("$this->scheme:///foo"));
|
||||
}
|
||||
|
||||
public function testFileIsReadable()
|
||||
{
|
||||
$this->assertTrue(is_readable("$this->scheme:///foo/bar"));
|
||||
}
|
||||
|
||||
public function testFileIsWritable()
|
||||
{
|
||||
$this->assertTrue(is_writable("$this->scheme:///foo/bar"));
|
||||
}
|
||||
|
||||
public function testFileIsExecutable()
|
||||
{
|
||||
$this->assertTrue(is_executable("$this->scheme:///foo/bar"));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user