Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Synchronizing defaults in test `Report` and `Dispatcher`.

Changing default for `'reporter'` in `Dispatcher`.
Adding missing options documentation.
  • Loading branch information...
commit dc68018cf74185c1bea4058721f3c3abdb699850 1 parent 5a92d99
@davidpersson davidpersson authored
Showing with 13 additions and 8 deletions.
  1. +7 −4 test/Dispatcher.php
  2. +6 −4 test/Report.php
View
11 test/Dispatcher.php
@@ -37,9 +37,11 @@ class Dispatcher extends \lithium\core\StaticObject {
* @param string $group If set, this test group is run. If not set, a group test may
* also be run by passing the 'group' option to the $options parameter.
* @param array $options Options array for the test run. Valid options are:
- * - 'case': The fully namespaced test case to be run.
- * - 'group': The fully namespaced test group to be run.
- * - 'filters': An array of filters that the test output should be run through.
+ * - `'case'`: The fully namespaced test case to be run.
+ * - `'group'`: The fully namespaced test group to be run.
+ * - `'filters'`: An array of filters that the test output should be run through.
+ * - `'reporter'`: The reporter to use, defaults to `'console'`.
+ * - `'format'`: The format of the reporter template to use, defaults to `'txt'`.
* @return array A compact array of the title, an array of the results, as well
* as an additional array of the results after the $options['filters']
* have been applied.
@@ -49,7 +51,8 @@ public static function run($group = null, array $options = array()) {
$defaults = array(
'title' => $group,
'filters' => array(),
- 'reporter' => 'text'
+ 'reporter' => 'console',
+ 'format' => 'txt'
);
$options += $defaults;
$isCase = is_string($group) && preg_match('/Test$/', $group);
View
10 test/Report.php
@@ -103,16 +103,18 @@ class Report extends \lithium\core\Object {
* Construct Report Object
*
* @param array $config Options array for the test run. Valid options are:
- * - 'group': The test group with items to be run.
- * - 'filters': An array of filters that the test output should be run through.
+ * - `'group'`: The test group with items to be run.
+ * - `'filters'`: An array of filters that the test output should be run through.
+ * - `'reporter'`: The reporter to use, defaults to `'console'`.
+ * - `'format'`: The format of the reporter template to use, defaults to `'txt'`.
*/
public function __construct(array $config = array()) {
$defaults = array(
'title' => null,
'group' => null,
'filters' => array(),
- 'format' => 'txt',
- 'reporter' => 'console'
+ 'reporter' => 'console',
+ 'format' => 'txt'
);
parent::__construct($config + $defaults);
}
Please sign in to comment.
Something went wrong with that request. Please try again.