]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Minor change to `ArcanistInfrastructureTestCase::testLibraryMap`
authorJoshua Spence <josh@joshuaspence.com>
Sun, 6 Jul 2014 13:50:30 +0000 (23:50 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Sun, 6 Jul 2014 13:50:30 +0000 (23:50 +1000)
Summary: Modify `ArcanistInfrastructureTestCase::testLibraryMap` to use `phutil_get_current_library_name()` instead of hard-coding the library name.

Test Plan: See D9844.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9846

src/__tests__/ArcanistInfrastructureTestCase.php

index 162e027f76f292f93bb9e143ad1ce617fe50597f..16aac24bbbe257fd465d504b3eb8cd18e0da5a11 100644 (file)
@@ -17,7 +17,8 @@ final class ArcanistInfrastructureTestCase extends ArcanistTestCase {
    * that all the library map is up-to-date.
    */
   public function testLibraryMap() {
-    $root = phutil_get_library_root('arcanist');
+    $library = phutil_get_current_library_name();
+    $root = phutil_get_library_root($library);
 
     $new_library_map = id(new PhutilLibraryMapBuilder($root))
       ->setQuiet(true)
@@ -25,7 +26,7 @@ final class ArcanistInfrastructureTestCase extends ArcanistTestCase {
       ->buildMap();
 
     $bootloader = PhutilBootloader::getInstance();
-    $old_library_map = $bootloader->getLibraryMapWithoutExtensions('arcanist');
+    $old_library_map = $bootloader->getLibraryMapWithoutExtensions($library);
     unset($old_library_map[PhutilLibraryMapBuilder::LIBRARY_MAP_VERSION_KEY]);
 
     $this->assertEqual(
@@ -34,4 +35,5 @@ final class ArcanistInfrastructureTestCase extends ArcanistTestCase {
       'The library map does not appear to be up-to-date. Try '.
       'rebuilding the map with `arc liberate`.');
   }
+
 }