wiki.techinc.nl/tests/phpunit/includes/resourceloader/ResourceLoaderFilePathTest.php
Timo Tijhof 8db937256b resourceloader: Complete test coverage for FilePath
The 'getLocalBasePath' and 'getRemoteBasePath' methods were not
yet covered.

Change-Id: If2eacca3a908048ec62b357e14e4e2322363e296
2019-07-19 23:36:38 +01:00

23 lines
731 B
PHP

<?php
/**
* @covers ResourceLoaderFilePath
*/
class ResourceLoaderFilePathTest extends PHPUnit\Framework\TestCase {
public function testConstructor() {
$path = new ResourceLoaderFilePath( 'dummy/path', '/local', '/remote' );
$this->assertInstanceOf( ResourceLoaderFilePath::class, $path );
}
public function testGetters() {
$path = new ResourceLoaderFilePath( 'dummy/path', '/local', '/remote' );
$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() );
}
}