lithium\test\Group::all PHP Method

all() public static method

Get all test cases. By default, does not include function or integration tests.
public static all ( array $options = [] ) : array
$options array
return array
    public static function all(array $options = array())
    {
        $defaults = array('filter' => '/cases/', 'exclude' => '/mocks/', 'recursive' => true);
        return Libraries::locate('tests', null, $options + $defaults);
    }

Usage Example

コード例 #1
0
ファイル: Controller.php プロジェクト: EHER/chegamos
 /**
  * Magic method to make Controller callable.
  *
  * @see lithium\action\Dispatcher::_callable()
  * @param object $request A \lithium\action\Request object.
  * @param array $dispatchParams Array of params after being parsed by router.
  * @param array $options Some basic options for this controller.
  * @return string
  */
 public function __invoke($request, $dispatchParams, array $options = array())
 {
     $dispatchParamsDefaults = array('args' => array());
     $dispatchParams += $dispatchParamsDefaults;
     $defaults = array('reporter' => 'html', 'format' => 'html');
     $options += (array) $request->query + $defaults;
     $params = compact('request', 'dispatchParams', 'options');
     set_time_limit(0);
     return $this->_filter(__METHOD__, $params, function ($self, $params) {
         $request = $params['request'];
         $options = $params['options'];
         $params = $params['dispatchParams'];
         $group = join('\\', (array) $params['args']);
         if ($group === "all") {
             $group = Group::all();
             $options['title'] = 'All Tests';
         }
         $report = Dispatcher::run($group, $options);
         $filters = Libraries::locate('test.filter');
         $menu = Libraries::locate('tests', null, array('filter' => '/cases|integration|functional/', 'exclude' => '/mocks/'));
         sort($menu);
         $result = compact('request', 'report', 'filters', 'menu');
         return $report->render('layout', $result);
     });
 }
All Usage Examples Of lithium\test\Group::all