mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 13:12:41 +00:00
Subject Robo file to coding standards
This commit is contained in:
parent
0785f832de
commit
392376a1ef
2 changed files with 26 additions and 25 deletions
|
@ -10,6 +10,7 @@ const BASE = __DIR__.DIRECTORY_SEPARATOR;
|
||||||
$paths = [
|
$paths = [
|
||||||
__FILE__,
|
__FILE__,
|
||||||
BASE."arsse.php",
|
BASE."arsse.php",
|
||||||
|
BASE."RoboFile.php",
|
||||||
BASE."lib",
|
BASE."lib",
|
||||||
BASE."tests",
|
BASE."tests",
|
||||||
];
|
];
|
||||||
|
|
50
RoboFile.php
50
RoboFile.php
|
@ -11,15 +11,15 @@ class RoboFile extends \Robo\Tasks {
|
||||||
const BASE = __DIR__.\DIRECTORY_SEPARATOR;
|
const BASE = __DIR__.\DIRECTORY_SEPARATOR;
|
||||||
const BASE_TEST = self::BASE."tests".\DIRECTORY_SEPARATOR;
|
const BASE_TEST = self::BASE."tests".\DIRECTORY_SEPARATOR;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the full test suite
|
* Runs the full test suite
|
||||||
*
|
*
|
||||||
* Arguments passed to the task are passed on to PHPUnit. Thus one may, for
|
* Arguments passed to the task are passed on to PHPUnit. Thus one may, for
|
||||||
* example, run the following command and get the expected results:
|
* example, run the following command and get the expected results:
|
||||||
*
|
*
|
||||||
* ./robo test --testsuite TTRSS --exclude-group slow --testdox
|
* ./robo test --testsuite TTRSS --exclude-group slow --testdox
|
||||||
*
|
*
|
||||||
* Please see the PHPUnit documentation for available options.
|
* Please see the PHPUnit documentation for available options.
|
||||||
*/
|
*/
|
||||||
public function test(array $args): Result {
|
public function test(array $args): Result {
|
||||||
// start the built-in PHP server, which is required for some of the tests
|
// start the built-in PHP server, which is required for some of the tests
|
||||||
|
@ -30,32 +30,32 @@ class RoboFile extends \Robo\Tasks {
|
||||||
return $this->taskExec("php")->arg($execpath)->option("-c", $confpath)->args($args)->run();
|
return $this->taskExec("php")->arg($execpath)->option("-c", $confpath)->args($args)->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs the full test suite
|
* Runs the full test suite
|
||||||
*
|
*
|
||||||
* This is an alias of the "test" task.
|
* This is an alias of the "test" task.
|
||||||
*/
|
*/
|
||||||
public function testFull(array $args): Result {
|
public function testFull(array $args): Result {
|
||||||
return $this->test($args);
|
return $this->test($args);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs a quick subset of the test suite
|
* Runs a quick subset of the test suite
|
||||||
*
|
*
|
||||||
* See help for the "test" task for more details.
|
* See help for the "test" task for more details.
|
||||||
*/
|
*/
|
||||||
public function testQuick(array $args): Result {
|
public function testQuick(array $args): Result {
|
||||||
return $this->test(array_merge(["--exclude-group","slow"], $args));
|
return $this->test(array_merge(["--exclude-group","slow"], $args));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Produces a code coverage report
|
/** Produces a code coverage report
|
||||||
*
|
*
|
||||||
* By default this task produces an HTML-format coverage report in
|
* By default this task produces an HTML-format coverage report in
|
||||||
* arsse/tests/coverage/. Additional reports may be produced by passing
|
* arsse/tests/coverage/. Additional reports may be produced by passing
|
||||||
* arguments to this task as one would to PHPUnit.
|
* arguments to this task as one would to PHPUnit.
|
||||||
*
|
*
|
||||||
* Robo first tries to use phpdbg and will fall back to Xdebug if available.
|
* Robo first tries to use phpdbg and will fall back to Xdebug if available.
|
||||||
* Because Xdebug slows down non-coverage tasks, however, phpdbg is highly
|
* Because Xdebug slows down non-coverage tasks, however, phpdbg is highly
|
||||||
* recommanded is debugging facilities are not otherwise needed.
|
* recommanded is debugging facilities are not otherwise needed.
|
||||||
*/
|
*/
|
||||||
public function coverage(array $args): Result {
|
public function coverage(array $args): Result {
|
||||||
|
@ -79,14 +79,14 @@ class RoboFile extends \Robo\Tasks {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Packages a given commit of the software into a release tarball
|
/** Packages a given commit of the software into a release tarball
|
||||||
*
|
*
|
||||||
* The version to package may be any Git tree-ish identifier: a tag, a branch,
|
* The version to package may be any Git tree-ish identifier: a tag, a branch,
|
||||||
* or any commit hash. If none is provided on the command line, Robo will prompt
|
* or any commit hash. If none is provided on the command line, Robo will prompt
|
||||||
* for a commit to package; the default is "head".
|
* for a commit to package; the default is "head".
|
||||||
*
|
*
|
||||||
* Note that while it is possible to re-package old versions, the resultant tarball
|
* Note that while it is possible to re-package old versions, the resultant tarball
|
||||||
* may not be equivalent due to subsequent changes in the exclude list, or because
|
* may not be equivalent due to subsequent changes in the exclude list, or because
|
||||||
* of new tooling.
|
* of new tooling.
|
||||||
*/
|
*/
|
||||||
public function package(string $version = null): Result {
|
public function package(string $version = null): Result {
|
||||||
|
@ -137,4 +137,4 @@ class RoboFile extends \Robo\Tasks {
|
||||||
}
|
}
|
||||||
return $t->run();
|
return $t->run();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue