2019-07-14 22:16:07 +00:00
|
|
|
<?php
|
|
|
|
|
|
2019-07-19 22:36:06 +00:00
|
|
|
/**
|
|
|
|
|
* @covers ResourceLoaderFilePath
|
|
|
|
|
*/
|
2019-07-19 22:39:11 +00:00
|
|
|
class ResourceLoaderFilePathTest extends MediaWikiUnitTestCase {
|
2019-07-14 22:16:07 +00:00
|
|
|
|
2019-07-19 22:36:06 +00:00
|
|
|
public function testConstructor() {
|
|
|
|
|
$path = new ResourceLoaderFilePath( 'dummy/path', '/local', '/remote' );
|
2019-07-14 22:16:07 +00:00
|
|
|
|
2019-07-19 22:36:06 +00:00
|
|
|
$this->assertInstanceOf( ResourceLoaderFilePath::class, $path );
|
2019-07-14 22:16:07 +00:00
|
|
|
}
|
|
|
|
|
|
2019-07-19 22:36:06 +00:00
|
|
|
public function testGetters() {
|
|
|
|
|
$path = new ResourceLoaderFilePath( 'dummy/path', '/local', '/remote' );
|
2019-07-14 22:16:07 +00:00
|
|
|
|
2019-07-19 22:36:06 +00:00
|
|
|
$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() );
|
2019-07-14 22:16:07 +00:00
|
|
|
}
|
|
|
|
|
}
|