こんなこと書いてたけど普通にできた。(simpletestは必要)
% cake testsuite app all
知らんかった・・・。
ついでに、phpunitを使ったseleniumのテストも一緒にできるshell作った。
app/vendors/shells/tasks/integrations.php:
<?php
class IntegrationsTask extends Shell
{
public function startup() {}
public function execute()
{
$this->out(`phpunit app/tests/integrations`);
}
}
app/vendors/shells/test.php:
class TestShell extends Shell
{
public $tasks = array('Cases', 'Integrations');
public function startup() {}
public function main()
{
$arg = isset($this->args[0]) ? $this->args[0] : '';
switch ($arg) {
case 'cases':
$this->Cases->execute();
break;
case 'integrations':
$this->Integrations->execute();
break;
default:
$this->Cases->execute();
$this->Integrations->execute();
}
}
}
% cake test