| 1 | <?php |
||
| 14 | abstract class AbstractCommandTest extends \PHPUnit_Framework_TestCase |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * The test subject |
||
| 18 | * |
||
| 19 | * @var \SilverLeague\Console\Command\SilverStripeCommand |
||
| 20 | */ |
||
| 21 | protected $command; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Add the command |
||
| 25 | */ |
||
| 26 | public function setUp() |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Provide the command name to test, e.g. "object:lookup" |
||
| 33 | * |
||
| 34 | * @return string |
||
| 35 | */ |
||
| 36 | abstract public function getTestCommand(); |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Create a CommandTester and execute the command with given arguments |
||
| 40 | * |
||
| 41 | * @param array $params |
||
| 42 | * @return CommandTester |
||
| 43 | */ |
||
| 44 | protected function executeTest(array $params) |
||
| 52 | } |
||
| 53 |