<?php
+/**
+ * @covers ResourceLoaderFilePath
+ */
class ResourceLoaderFilePathTest extends PHPUnit\Framework\TestCase {
- /**
- * @covers ResourceLoaderFilePath::__construct
- */
- public function testConstructor() {
- $resourceLoaderFilePath = new ResourceLoaderFilePath(
- 'dummy/path', 'localBasePath', 'remoteBasePath'
- );
-
- $this->assertInstanceOf( ResourceLoaderFilePath::class, $resourceLoaderFilePath );
- }
-
- /**
- * @covers ResourceLoaderFilePath::getLocalPath
- */
- public function testGetLocalPath() {
- $resourceLoaderFilePath = new ResourceLoaderFilePath(
- 'dummy/path', 'localBasePath', 'remoteBasePath'
- );
- $this->assertSame(
- 'localBasePath/dummy/path', $resourceLoaderFilePath->getLocalPath()
- );
- }
-
- /**
- * @covers ResourceLoaderFilePath::getRemotePath
- */
- public function testGetRemotePath() {
- $resourceLoaderFilePath = new ResourceLoaderFilePath(
- 'dummy/path', 'localBasePath', 'remoteBasePath'
- );
+ public function testConstructor() {
+ $path = new ResourceLoaderFilePath( 'dummy/path', '/local', '/remote' );
- $this->assertSame(
- 'remoteBasePath/dummy/path', $resourceLoaderFilePath->getRemotePath()
- );
+ $this->assertInstanceOf( ResourceLoaderFilePath::class, $path );
}
- /**
- * @covers ResourceLoaderFilePath::getPath
- */
- public function testGetPath() {
- $resourceLoaderFilePath = new ResourceLoaderFilePath(
- 'dummy/path', 'localBasePath', 'remoteBasePath'
- );
+ public function testGetters() {
+ $path = new ResourceLoaderFilePath( 'dummy/path', '/local', '/remote' );
- $this->assertSame(
- 'dummy/path', $resourceLoaderFilePath->getPath()
- );
+ $this->assertSame( '/local/dummy/path', $path->getLocalPath() );
+ $this->assertSame( '/remote/dummy/path', $path->getRemotePath() );
+ $this->assertSame( '/local', $path->getLocalBasePath() );
+ $this->assertSame( '/remote', $path->getRemoteBasePath() );
+ $this->assertSame( 'dummy/path', $path->getPath() );
}
}