wiki.techinc.nl/tests/phpunit/unit/includes/resourceloader/ResourceLoaderFilePathTest.php
Timo Tijhof 6e0c9c69b7 resourceloader: Move FilePath test to /tests/phpunit/unit
Pure value object. No external dependencies.

Change-Id: If4120ca302c2fab2a41880c32e164d36566ed9de
2019-07-20 16:23:12 +00:00

23 lines
726 B
PHP

<?php
/**
* @covers ResourceLoaderFilePath
*/
class ResourceLoaderFilePathTest extends MediaWikiUnitTestCase {
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() );
}
}