mirror of
https://github.com/adlawson/php-vfs.git
synced 2024-11-24 21:57:40 +00:00
Add symlink
and is_link
acceptance tests
This commit is contained in:
parent
e495f5765a
commit
a7050a3990
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
namespace Vfs\Stream\StreamWrapper;
|
||||
|
||||
use Vfs\Test\AcceptanceTestCase;
|
||||
|
||||
class SymlinkAcceptanceTest extends AcceptanceTestCase
|
||||
{
|
||||
protected $tree = [
|
||||
'foo' => [
|
||||
'bar' => 'baz'
|
||||
]
|
||||
];
|
||||
|
||||
public function testIsLink()
|
||||
{
|
||||
$factory = $this->fs->getNodeFactory();
|
||||
|
||||
$file = $this->fs->get('/foo/bar');
|
||||
$this->fs->get('/')->add('symlink', $factory->buildFileLink($file));
|
||||
|
||||
$this->assertTrue(is_link("$this->scheme:///symlink"));
|
||||
}
|
||||
|
||||
public function testDirectoryLink()
|
||||
{
|
||||
$this->markTestSkipped('`symlink()` isn\'t supported by PHP Stream Wrappers');
|
||||
|
||||
symlink("$this->scheme:///foo/bar", "$this->scheme:///symlink");
|
||||
|
||||
$this->assertTrue(is_link("$this->scheme:///symlink"));
|
||||
}
|
||||
|
||||
public function testFileLink()
|
||||
{
|
||||
$this->markTestSkipped('`symlink()` isn\'t supported by PHP Stream Wrappers');
|
||||
|
||||
symlink("$this->scheme:///foo", "$this->scheme:///symlink");
|
||||
|
||||
$this->assertTrue(is_link("$this->scheme:///symlink"));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user