mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Correcting doc blocks.
This commit is contained in:
parent
1e0215b7c1
commit
8a56793368
1 changed files with 15 additions and 9 deletions
|
@ -97,6 +97,7 @@ class TestManager {
|
||||||
* @param boolean $testing Are tests supposed to be auto run. Set to true to return testcase list.
|
* @param boolean $testing Are tests supposed to be auto run. Set to true to return testcase list.
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @access public
|
* @access public
|
||||||
|
* @static
|
||||||
*/
|
*/
|
||||||
function runAllTests(&$reporter, $testing = false) {
|
function runAllTests(&$reporter, $testing = false) {
|
||||||
$manager =& new TestManager();
|
$manager =& new TestManager();
|
||||||
|
@ -181,6 +182,7 @@ class TestManager {
|
||||||
* @param string $directory The directory to add tests from.
|
* @param string $directory The directory to add tests from.
|
||||||
* @return void
|
* @return void
|
||||||
* @access public
|
* @access public
|
||||||
|
* @static
|
||||||
*/
|
*/
|
||||||
function addTestCasesFromDirectory(&$groupTest, $directory = '.') {
|
function addTestCasesFromDirectory(&$groupTest, $directory = '.') {
|
||||||
$manager =& new TestManager();
|
$manager =& new TestManager();
|
||||||
|
@ -197,6 +199,7 @@ class TestManager {
|
||||||
* @param string $file The file name, minus the suffix to add.
|
* @param string $file The file name, minus the suffix to add.
|
||||||
* @return void
|
* @return void
|
||||||
* @access public
|
* @access public
|
||||||
|
* @static
|
||||||
*/
|
*/
|
||||||
function addTestFile(&$groupTest, $file) {
|
function addTestFile(&$groupTest, $file) {
|
||||||
$manager =& new TestManager();
|
$manager =& new TestManager();
|
||||||
|
@ -223,6 +226,7 @@ class TestManager {
|
||||||
/**
|
/**
|
||||||
* Builds the list of test cases from a given directory
|
* Builds the list of test cases from a given directory
|
||||||
*
|
*
|
||||||
|
* @param string $directory Directory to get test case list from.
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
function &_getTestCaseList($directory = '.') {
|
function &_getTestCaseList($directory = '.') {
|
||||||
|
@ -237,7 +241,8 @@ class TestManager {
|
||||||
/**
|
/**
|
||||||
* Returns a list of test files from a given directory
|
* Returns a list of test files from a given directory
|
||||||
*
|
*
|
||||||
* @access public
|
* @param string $directory Directory to get test case files from.
|
||||||
|
* @access protected
|
||||||
*/
|
*/
|
||||||
function &_getTestFileList($directory = '.') {
|
function &_getTestFileList($directory = '.') {
|
||||||
$return = $this->_getRecursiveFileList($directory, array(&$this, '_isTestCaseFile'));
|
$return = $this->_getRecursiveFileList($directory, array(&$this, '_isTestCaseFile'));
|
||||||
|
@ -248,6 +253,7 @@ class TestManager {
|
||||||
* Returns a list of group tests found in the current valid test case path
|
* Returns a list of group tests found in the current valid test case path
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
|
* @static
|
||||||
*/
|
*/
|
||||||
function &getGroupTestList() {
|
function &getGroupTestList() {
|
||||||
$manager =& new TestManager();
|
$manager =& new TestManager();
|
||||||
|
@ -259,7 +265,7 @@ class TestManager {
|
||||||
* Returns a list of group test files from a given directory
|
* Returns a list of group test files from a given directory
|
||||||
*
|
*
|
||||||
* @param string $directory The directory to get group test files from.
|
* @param string $directory The directory to get group test files from.
|
||||||
* @access public
|
* @access protected
|
||||||
*/
|
*/
|
||||||
function &_getTestGroupFileList($directory = '.') {
|
function &_getTestGroupFileList($directory = '.') {
|
||||||
$return = $this->_getRecursiveFileList($directory, array(&$this, '_isTestGroupFile'));
|
$return = $this->_getRecursiveFileList($directory, array(&$this, '_isTestGroupFile'));
|
||||||
|
@ -270,7 +276,7 @@ class TestManager {
|
||||||
* Returns a list of group test files from a given directory
|
* Returns a list of group test files from a given directory
|
||||||
*
|
*
|
||||||
* @param string $directory The directory to get group tests from.
|
* @param string $directory The directory to get group tests from.
|
||||||
* @access public
|
* @access protected
|
||||||
*/
|
*/
|
||||||
function &_getTestGroupList($directory = '.') {
|
function &_getTestGroupList($directory = '.') {
|
||||||
$fileList =& $this->_getTestGroupFileList($directory);
|
$fileList =& $this->_getTestGroupFileList($directory);
|
||||||
|
@ -287,7 +293,7 @@ class TestManager {
|
||||||
* Returns a list of class names from a group test file
|
* Returns a list of class names from a group test file
|
||||||
*
|
*
|
||||||
* @param string $groupTestFile The groupTest file to scan for TestSuite classnames.
|
* @param string $groupTestFile The groupTest file to scan for TestSuite classnames.
|
||||||
* @access public
|
* @access protected
|
||||||
*/
|
*/
|
||||||
function &_getGroupTestClassNames($groupTestFile) {
|
function &_getGroupTestClassNames($groupTestFile) {
|
||||||
$file = implode("\n", file($groupTestFile));
|
$file = implode("\n", file($groupTestFile));
|
||||||
|
@ -306,7 +312,7 @@ class TestManager {
|
||||||
*
|
*
|
||||||
* @param string $directory The directory to scan for files.
|
* @param string $directory The directory to scan for files.
|
||||||
* @param mixed $fileTestFunction
|
* @param mixed $fileTestFunction
|
||||||
* @access public
|
* @access protected
|
||||||
*/
|
*/
|
||||||
function &_getRecursiveFileList($directory = '.', $fileTestFunction) {
|
function &_getRecursiveFileList($directory = '.', $fileTestFunction) {
|
||||||
$fileList = array();
|
$fileList = array();
|
||||||
|
@ -332,7 +338,7 @@ class TestManager {
|
||||||
*
|
*
|
||||||
* @param string $file
|
* @param string $file
|
||||||
* @return void
|
* @return void
|
||||||
* @access public
|
* @access protected
|
||||||
*/
|
*/
|
||||||
function _isTestCaseFile($file) {
|
function _isTestCaseFile($file) {
|
||||||
return $this->_hasExpectedExtension($file, $this->_testExtension);
|
return $this->_hasExpectedExtension($file, $this->_testExtension);
|
||||||
|
@ -343,7 +349,7 @@ class TestManager {
|
||||||
*
|
*
|
||||||
* @param string $file
|
* @param string $file
|
||||||
* @return void
|
* @return void
|
||||||
* @access public
|
* @access protected
|
||||||
*/
|
*/
|
||||||
function _isTestGroupFile($file) {
|
function _isTestGroupFile($file) {
|
||||||
return $this->_hasExpectedExtension($file, $this->_groupExtension);
|
return $this->_hasExpectedExtension($file, $this->_groupExtension);
|
||||||
|
@ -355,7 +361,7 @@ class TestManager {
|
||||||
* @param string $file
|
* @param string $file
|
||||||
* @param string $extension
|
* @param string $extension
|
||||||
* @return void
|
* @return void
|
||||||
* @access public
|
* @access protected
|
||||||
*/
|
*/
|
||||||
function _hasExpectedExtension($file, $extension) {
|
function _hasExpectedExtension($file, $extension) {
|
||||||
return $extension == strtolower(substr($file, (0 - strlen($extension))));
|
return $extension == strtolower(substr($file, (0 - strlen($extension))));
|
||||||
|
@ -366,7 +372,7 @@ class TestManager {
|
||||||
*
|
*
|
||||||
* @param string $type either 'cases' or 'groups'
|
* @param string $type either 'cases' or 'groups'
|
||||||
* @return string The path tests are located on
|
* @return string The path tests are located on
|
||||||
* @access public
|
* @access protected
|
||||||
*/
|
*/
|
||||||
function _getTestsPath($type = 'cases') {
|
function _getTestsPath($type = 'cases') {
|
||||||
if (!empty($this->appTest)) {
|
if (!empty($this->appTest)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue