]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Add a unit test to check `src/__phutil_library_map__.php`.
authorJoshua Spence <josh@joshuaspence.com>
Sun, 15 Jun 2014 19:42:43 +0000 (05:42 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Sun, 15 Jun 2014 19:42:43 +0000 (05:42 +1000)
Summary: See D9557. Add a unit test to ensure that `src/__phutil_library_map__.php` is up-to-date.

Test Plan: Ran `arc unit`.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

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

src/__phutil_library_map__.php
src/__tests__/ArcanistInfrastructureTestCase.php [new file with mode: 0644]

index 3cd13d5e7e8c4f02305dcf61163c2b3116ac10ad..972915e1b227280275dae258429652817d74859f 100644 (file)
@@ -88,6 +88,7 @@ phutil_register_library_map(array(
     'ArcanistHgProxyServer' => 'hgdaemon/ArcanistHgProxyServer.php',
     'ArcanistHgServerChannel' => 'hgdaemon/ArcanistHgServerChannel.php',
     'ArcanistHookAPI' => 'repository/hookapi/ArcanistHookAPI.php',
+    'ArcanistInfrastructureTestCase' => '__tests__/ArcanistInfrastructureTestCase.php',
     'ArcanistInlinesWorkflow' => 'workflow/ArcanistInlinesWorkflow.php',
     'ArcanistInstallCertificateWorkflow' => 'workflow/ArcanistInstallCertificateWorkflow.php',
     'ArcanistJSHintLinter' => 'lint/linter/ArcanistJSHintLinter.php',
@@ -265,6 +266,7 @@ phutil_register_library_map(array(
     'ArcanistHelpWorkflow' => 'ArcanistBaseWorkflow',
     'ArcanistHgClientChannel' => 'PhutilProtocolChannel',
     'ArcanistHgServerChannel' => 'PhutilProtocolChannel',
+    'ArcanistInfrastructureTestCase' => 'ArcanistTestCase',
     'ArcanistInlinesWorkflow' => 'ArcanistBaseWorkflow',
     'ArcanistInstallCertificateWorkflow' => 'ArcanistBaseWorkflow',
     'ArcanistJSHintLinter' => 'ArcanistExternalLinter',
diff --git a/src/__tests__/ArcanistInfrastructureTestCase.php b/src/__tests__/ArcanistInfrastructureTestCase.php
new file mode 100644 (file)
index 0000000..e1d6bb4
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+
+final class ArcanistInfrastructureTestCase extends ArcanistTestCase {
+  /**
+   * This is more of an acceptance test case instead of a unit test. It verifies
+   * that all symbols can be loaded correctly. It can catch problems like
+   * missing methods in descendants of abstract base classes.
+   */
+  public function testEverythingImplemented() {
+    id(new PhutilSymbolLoader())->selectAndLoadSymbols();
+    $this->assertTrue(true);
+  }
+}