resourceloader: Move FilePath test to /tests/phpunit/unit
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 19 Jul 2019 22:39:11 +0000 (23:39 +0100)
committerKrinkle <krinklemail@gmail.com>
Sat, 20 Jul 2019 16:23:12 +0000 (16:23 +0000)
Pure value object. No external dependencies.

Change-Id: If4120ca302c2fab2a41880c32e164d36566ed9de

tests/phpunit/includes/resourceloader/ResourceLoaderFilePathTest.php [deleted file]
tests/phpunit/unit/includes/resourceloader/ResourceLoaderFilePathTest.php [new file with mode: 0644]

diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderFilePathTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderFilePathTest.php
deleted file mode 100644 (file)
index 1249ca5..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?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() );
-       }
-}
diff --git a/tests/phpunit/unit/includes/resourceloader/ResourceLoaderFilePathTest.php b/tests/phpunit/unit/includes/resourceloader/ResourceLoaderFilePathTest.php
new file mode 100644 (file)
index 0000000..b1db383
--- /dev/null
@@ -0,0 +1,23 @@
+<?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() );
+       }
+}