diff --git a/.arcunit b/.arcunit index 860ee1aee2..1c89ad7b5b 100644 --- a/.arcunit +++ b/.arcunit @@ -3,6 +3,10 @@ "phutil": { "type": "phutil", "include": "(\\.php$)" + }, + "celerity": { + "type": "celerity", + "include": "(\\.(css|js)$)" } } } diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index ab7b2f5a2d..24daab9cf5 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -338,6 +338,7 @@ phutil_register_library_map(array( 'CelerityResourcesOnDisk' => 'applications/celerity/resources/CelerityResourcesOnDisk.php', 'CeleritySpriteGenerator' => 'applications/celerity/CeleritySpriteGenerator.php', 'CelerityStaticResourceResponse' => 'applications/celerity/CelerityStaticResourceResponse.php', + 'CelerityUnitTestEngine' => 'applications/celerity/CelerityUnitTestEngine.php', 'ConduitAPIDocumentationPage' => 'applications/conduit/data/ConduitAPIDocumentationPage.php', 'ConduitAPIMethod' => 'applications/conduit/method/ConduitAPIMethod.php', 'ConduitAPIMethodTestCase' => 'applications/conduit/method/__tests__/ConduitAPIMethodTestCase.php', @@ -6361,6 +6362,7 @@ phutil_register_library_map(array( 'CelerityResourcesOnDisk' => 'CelerityPhysicalResources', 'CeleritySpriteGenerator' => 'Phobject', 'CelerityStaticResourceResponse' => 'Phobject', + 'CelerityUnitTestEngine' => 'ArcanistUnitTestEngine', 'ConduitAPIDocumentationPage' => 'Phobject', 'ConduitAPIMethod' => array( 'Phobject', diff --git a/src/applications/celerity/CelerityUnitTestEngine.php b/src/applications/celerity/CelerityUnitTestEngine.php new file mode 100644 index 0000000000..c893265276 --- /dev/null +++ b/src/applications/celerity/CelerityUnitTestEngine.php @@ -0,0 +1,31 @@ +getRunAllTests() || $this->getPaths()) { + $test_case = new PhabricatorCelerityTestCase(); + $test_case->willRunTestCases(array($test_case)); + $test_case->setWorkingCopy($this->getWorkingCopy()); + if ($this->renderer) { + $test_case->setRenderer($this->renderer); + } + $result = $test_case->run(); + $test_case->didRunTestCases(array($test_case)); + return $result; + } + return array(); + } + + }