/** * @covers \Core\FileSystem\FileSystemKernel::pathInfo * @covers \Core\FileSystem\FileSystemKernel::basename * @covers \Core\FileSystem\FileSystemKernel::dirname * @covers \Core\FileSystem\FileSystemKernel::filename * @covers \Core\FileSystem\FileSystemKernel::extension */ public function testFilePathInfo() { $this->assertTrue(FileSystem::exists(vfsStream::url('root/dir2/file3'))); $pathInfo = FileSystem::pathInfo(vfsStream::url('root/dir2/file3')); $this->assertInternalType('array', $pathInfo); $this->assertArrayHasKey('basename', $pathInfo); $this->assertArrayHasKey('dirname', $pathInfo); $this->assertArrayHasKey('filename', $pathInfo); $this->assertInternalType('string', FileSystem::basename(vfsStream::url('root/dir2/file3'))); $this->assertEquals('file3', FileSystem::basename(vfsStream::url('root/dir2/file3'))); $this->assertInternalType('string', FileSystem::dirname(vfsStream::url('root/dir2/file3'))); $this->assertEquals('vfs://root/dir2', FileSystem::dirname(vfsStream::url('root/dir2/file3'))); $this->assertInternalType('string', FileSystem::filename(vfsStream::url('root/dir2/file3'))); $this->assertEquals('file3', FileSystem::filename(vfsStream::url('root/dir2/file3'))); $this->assertInternalType('string', FileSystem::extension(vfsStream::url('root/dir2/file3'))); $this->assertEquals('', FileSystem::extension(vfsStream::url('root/dir2/file3'))); }