From 407af5ef5b3e1b2e06c348582a6441ce47f24265 Mon Sep 17 00:00:00 2001 From: adlawson Date: Tue, 21 Jul 2015 12:27:37 +0100 Subject: [PATCH] Test the stripping of `://` from scheme --- test/unit/FileSystemTest.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/unit/FileSystemTest.php b/test/unit/FileSystemTest.php index 6663839..09724d4 100644 --- a/test/unit/FileSystemTest.php +++ b/test/unit/FileSystemTest.php @@ -68,4 +68,19 @@ class FileSystemTest extends UnitTestCase $this->fs->unmount(); } + + public function testGetScheme() + { + $this->assertSame($this->scheme, $this->fs->getScheme()); + } + + public function testGetSchemeWithoutColonSlashSlash() + { + $factory = Mockery::mock('Vfs\Node\Factory\NodeFactoryInterface'); + $factory->shouldReceive('buildDirectory')->once()->withNoArgs()->andReturn($this->root); + + $fs = new FileSystem("foo://", $this->wrapperClass, $factory, $this->walker, $this->registry, $this->logger); + + $this->assertSame($this->scheme, $fs->getScheme()); + } }