Merge "Remember checkbox state on Special:Block if checkbox disabled"
[lhc/web/wiklou.git] / tests / phpunit / includes / resourceloader / ResourceLoaderFilePathTest.php
1 <?php
2
3 class ResourceLoaderFilePathTest extends PHPUnit\Framework\TestCase {
4 /**
5 * @covers ResourceLoaderFilePath::__construct
6 */
7 public function testConstructor() {
8 $resourceLoaderFilePath = new ResourceLoaderFilePath(
9 'dummy/path', 'localBasePath', 'remoteBasePath'
10 );
11
12 $this->assertInstanceOf( ResourceLoaderFilePath::class, $resourceLoaderFilePath );
13 }
14
15 /**
16 * @covers ResourceLoaderFilePath::getLocalPath
17 */
18 public function testGetLocalPath() {
19 $resourceLoaderFilePath = new ResourceLoaderFilePath(
20 'dummy/path', 'localBasePath', 'remoteBasePath'
21 );
22
23 $this->assertSame(
24 'localBasePath/dummy/path', $resourceLoaderFilePath->getLocalPath()
25 );
26 }
27
28 /**
29 * @covers ResourceLoaderFilePath::getRemotePath
30 */
31 public function testGetRemotePath() {
32 $resourceLoaderFilePath = new ResourceLoaderFilePath(
33 'dummy/path', 'localBasePath', 'remoteBasePath'
34 );
35
36 $this->assertSame(
37 'remoteBasePath/dummy/path', $resourceLoaderFilePath->getRemotePath()
38 );
39 }
40
41 /**
42 * @covers ResourceLoaderFilePath::getPath
43 */
44 public function testGetPath() {
45 $resourceLoaderFilePath = new ResourceLoaderFilePath(
46 'dummy/path', 'localBasePath', 'remoteBasePath'
47 );
48
49 $this->assertSame(
50 'dummy/path', $resourceLoaderFilePath->getPath()
51 );
52 }
53 }