소스 검색

Subject Robo file to coding standards

microsub
J. King 6 년 전
부모
커밋
392376a1ef
  1. 1
      .php_cs.dist
  2. 50
      RoboFile.php

1
.php_cs.dist

@ -10,6 +10,7 @@ const BASE = __DIR__.DIRECTORY_SEPARATOR;
$paths = [
__FILE__,
BASE."arsse.php",
BASE."RoboFile.php",
BASE."lib",
BASE."tests",
];

50
RoboFile.php

@ -11,15 +11,15 @@ class RoboFile extends \Robo\Tasks {
const BASE = __DIR__.\DIRECTORY_SEPARATOR;
const BASE_TEST = self::BASE."tests".\DIRECTORY_SEPARATOR;
/**
* Runs the full test suite
*
* Arguments passed to the task are passed on to PHPUnit. Thus one may, for
/**
* Runs the full test suite
*
* Arguments passed to the task are passed on to PHPUnit. Thus one may, for
* example, run the following command and get the expected results:
*
* ./robo test --testsuite TTRSS --exclude-group slow --testdox
*
* Please see the PHPUnit documentation for available options.
*
* ./robo test --testsuite TTRSS --exclude-group slow --testdox
*
* Please see the PHPUnit documentation for available options.
*/
public function test(array $args): Result {
// 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();
}
/**
* Runs the full test suite
*
* This is an alias of the "test" task.
/**
* Runs the full test suite
*
* This is an alias of the "test" task.
*/
public function testFull(array $args): Result {
return $this->test($args);
}
/**
* Runs a quick subset of the test suite
*
* See help for the "test" task for more details.
/**
* Runs a quick subset of the test suite
*
* See help for the "test" task for more details.
*/
public function testQuick(array $args): Result {
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
* arsse/tests/coverage/. Additional reports may be produced by passing
* arguments to this task as one would to PHPUnit.
*
*
* 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.
*/
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,
* or any commit hash. If none is provided on the command line, Robo will prompt
* for a commit to package; the default is "head".
*
*
* 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.
*/
public function package(string $version = null): Result {
@ -137,4 +137,4 @@ class RoboFile extends \Robo\Tasks {
}
return $t->run();
}
}
}

불러오는 중...
취소
저장