| 1 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/*
|
|
|
4 |
* This file is part of the symfony package.
|
|
|
5 |
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
|
|
|
6 |
*
|
|
|
7 |
* For the full copyright and license information, please view the LICENSE
|
|
|
8 |
* file that was distributed with this source code.
|
|
|
9 |
*/
|
|
|
10 |
|
|
|
11 |
/**
|
|
|
12 |
* Base test task.
|
|
|
13 |
*
|
|
|
14 |
* @package symfony
|
|
|
15 |
* @subpackage task
|
|
|
16 |
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
|
|
|
17 |
* @version SVN: $Id: sfTestBaseTask.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
|
|
|
18 |
*/
|
|
|
19 |
abstract class sfTestBaseTask extends sfBaseTask
|
|
|
20 |
{
|
|
|
21 |
/**
|
|
|
22 |
* Filters tests through the "task.test.filter_test_files" event.
|
|
|
23 |
*
|
|
|
24 |
* @param array $tests An array of absolute test file paths
|
|
|
25 |
* @param array $arguments Current task arguments
|
|
|
26 |
* @param array $options Current task options
|
|
|
27 |
*
|
|
|
28 |
* @return array The filtered array of test files
|
|
|
29 |
*/
|
|
|
30 |
protected function filterTestFiles($tests, $arguments, $options)
|
|
|
31 |
{
|
|
|
32 |
$event = new sfEvent($this, 'task.test.filter_test_files', array('arguments' => $arguments, 'options' => $options));
|
|
|
33 |
|
|
|
34 |
$this->dispatcher->filter($event, $tests);
|
|
|
35 |
|
|
|
36 |
return $event->getReturnValue();
|
|
|
37 |
}
|
|
|
38 |
}
|