]> khamidou — GitHub mirrors - arcanist.git/commitdiff
[Tests] Only use concrete TestCases
authorEdward Speyer <edward@fb.com>
Sun, 22 Apr 2012 20:06:32 +0000 (13:06 -0700)
committerEdward Speyer <edward@fb.com>
Mon, 23 Apr 2012 17:40:56 +0000 (10:40 -0700)
Summary:
Don't use abstract subclasses of ArcanistPhutilTestCase, only use
concrete ones.

This lets you put common functionality in an abstract BaseTestCase
(which itself is a subclass of ArcanistPhutilTestCase), then implement
concrete subclasses of the BaseTestCase.

Test Plan: Tested with a simple Base -> {Case1, Case2} setup.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Koolvin
Differential Revision: https://secure.phabricator.com/D2300

src/unit/engine/phutil/PhutilUnitTestEngine.php

index 50b152a8fe965c8d4041535ed3ca7879c99ab56a..ec96e7f454eea034c3a42719c1dc929bc90cca70 100644 (file)
@@ -118,6 +118,7 @@ final class PhutilUnitTestEngine extends ArcanistBaseUnitTestEngine {
         ->setLibrary($test['library'])
         ->setModule($test['module'])
         ->setAncestorClass('ArcanistPhutilTestCase')
+        ->setConcreteOnly(true)
         ->selectAndLoadSymbols();
       foreach ($symbols as $symbol) {
         $run_tests[$symbol['name']] = true;