mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fix the test suite package doc block errors.
This commit is contained in:
parent
7058921275
commit
ab5da2a09f
5 changed files with 46 additions and 44 deletions
|
@ -71,7 +71,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
* If no TestResult object is passed a new one will be created.
|
||||
* This method is run for each test method in this class
|
||||
*
|
||||
* @param PHPUnit_Framework_TestResult $result
|
||||
* @param PHPUnit_Framework_TestResult $result The test result object
|
||||
* @return PHPUnit_Framework_TestResult
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
|
@ -107,8 +107,8 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
/**
|
||||
* Overrides SimpleTestCase::skipIf to provide a boolean return value
|
||||
*
|
||||
* @param boolean $shouldSkip
|
||||
* @param string $message
|
||||
* @param boolean $shouldSkip Whether or not the test should be skipped.
|
||||
* @param string $message The message to display.
|
||||
* @return boolean
|
||||
*/
|
||||
public function skipIf($shouldSkip, $message = '') {
|
||||
|
@ -196,8 +196,8 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
/**
|
||||
* Chooses which fixtures to load for a given test
|
||||
*
|
||||
* @param string $fixture Each parameter is a model name that corresponds to a
|
||||
* fixture, i.e. 'Post', 'Author', etc.
|
||||
* Each parameter is a model name that corresponds to a fixture, i.e. 'Post', 'Author', etc.
|
||||
*
|
||||
* @return void
|
||||
* @see CakeTestCase::$autoFixtures
|
||||
* @throws Exception when no fixture manager is available.
|
||||
|
@ -218,7 +218,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
*
|
||||
* @param string $expected The expected value.
|
||||
* @param string $result The actual value.
|
||||
* @param message The message to use for failure.
|
||||
* @param string $message The message to use for failure.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTextNotEquals($expected, $result, $message = '') {
|
||||
|
@ -233,7 +233,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
*
|
||||
* @param string $expected The expected value.
|
||||
* @param string $result The actual value.
|
||||
* @param message The message to use for failure.
|
||||
* @param string $message message The message to use for failure.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTextEquals($expected, $result, $message = '') {
|
||||
|
@ -246,9 +246,9 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
* Asserts that a string starts with a given prefix, ignoring differences in newlines.
|
||||
* Helpful for doing cross platform tests of blocks of text.
|
||||
*
|
||||
* @param string $prefix
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
* @param string $prefix The prefix to check for.
|
||||
* @param string $string The string to search in.
|
||||
* @param string $message The message to use for failure.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTextStartsWith($prefix, $string, $message = '') {
|
||||
|
@ -261,9 +261,9 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
* Asserts that a string starts not with a given prefix, ignoring differences in newlines.
|
||||
* Helpful for doing cross platform tests of blocks of text.
|
||||
*
|
||||
* @param string $prefix
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
* @param string $prefix The prefix to not find.
|
||||
* @param string $string The string to search.
|
||||
* @param string $message The message to use for failure.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTextStartsNotWith($prefix, $string, $message = '') {
|
||||
|
@ -276,9 +276,9 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
* Asserts that a string ends with a given prefix, ignoring differences in newlines.
|
||||
* Helpful for doing cross platform tests of blocks of text.
|
||||
*
|
||||
* @param string $suffix
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
* @param string $suffix The suffix to find.
|
||||
* @param string $string The string to search.
|
||||
* @param string $message The message to use for failure.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTextEndsWith($suffix, $string, $message = '') {
|
||||
|
@ -291,9 +291,9 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
* Asserts that a string ends not with a given prefix, ignoring differences in newlines.
|
||||
* Helpful for doing cross platform tests of blocks of text.
|
||||
*
|
||||
* @param string $suffix
|
||||
* @param string $string
|
||||
* @param string $message
|
||||
* @param string $suffix The suffix to not find.
|
||||
* @param string $string The string to search.
|
||||
* @param string $message The message to use for failure.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTextEndsNotWith($suffix, $string, $message = '') {
|
||||
|
@ -306,10 +306,10 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
* Assert that a string contains another string, ignoring differences in newlines.
|
||||
* Helpful for doing cross platform tests of blocks of text.
|
||||
*
|
||||
* @param string $needle
|
||||
* @param string $haystack
|
||||
* @param string $message
|
||||
* @param boolean $ignoreCase
|
||||
* @param string $needle The string to search for.
|
||||
* @param string $haystack The string to search through.
|
||||
* @param string $message The message to display on failure.
|
||||
* @param boolean $ignoreCase Whether or not the search should be case-sensitive.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTextContains($needle, $haystack, $message = '', $ignoreCase = false) {
|
||||
|
@ -322,10 +322,10 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
* Assert that a text doesn't contain another text, ignoring differences in newlines.
|
||||
* Helpful for doing cross platform tests of blocks of text.
|
||||
*
|
||||
* @param string $needle
|
||||
* @param string $haystack
|
||||
* @param string $message
|
||||
* @param boolean $ignoreCase
|
||||
* @param string $needle The string to search for.
|
||||
* @param string $haystack The string to search through.
|
||||
* @param string $message The message to display on failure.
|
||||
* @param boolean $ignoreCase Whether or not the search should be case-sensitive.
|
||||
* @return boolean
|
||||
*/
|
||||
public function assertTextNotContains($needle, $haystack, $message = '', $ignoreCase = false) {
|
||||
|
@ -712,9 +712,9 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
/**
|
||||
* Mock a model, maintain fixtures and table association
|
||||
*
|
||||
* @param string $model
|
||||
* @param mixed $methods
|
||||
* @param array $config
|
||||
* @param string $model The model to get a mock for.
|
||||
* @param mixed $methods The list of methods to mock
|
||||
* @param array $config The config data for the mock's constructor.
|
||||
* @throws MissingModelException
|
||||
* @return Model
|
||||
*/
|
||||
|
|
|
@ -30,8 +30,8 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
|
|||
/**
|
||||
* Load a file and find the first test case / suite in that file.
|
||||
*
|
||||
* @param string $filePath
|
||||
* @param string $params
|
||||
* @param string $filePath The file path to load
|
||||
* @param string $params Additional parameters
|
||||
* @return ReflectionClass
|
||||
*/
|
||||
public function load($filePath, $params = '') {
|
||||
|
@ -42,8 +42,8 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
|
|||
/**
|
||||
* Convert path fragments used by CakePHP's test runner to absolute paths that can be fed to PHPUnit.
|
||||
*
|
||||
* @param string $filePath
|
||||
* @param string $params
|
||||
* @param string $filePath The file path to load
|
||||
* @param string $params Additional parameters
|
||||
* @return void
|
||||
*/
|
||||
protected function _resolveTestFile($filePath, $params) {
|
||||
|
@ -55,7 +55,7 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
|
|||
/**
|
||||
* Generates the base path to a set of tests based on the parameters.
|
||||
*
|
||||
* @param array $params
|
||||
* @param array $params The path parameters.
|
||||
* @return string The base path.
|
||||
*/
|
||||
protected static function _basePath($params) {
|
||||
|
@ -81,7 +81,7 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
|
|||
/**
|
||||
* Get the list of files for the test listing.
|
||||
*
|
||||
* @param string $params
|
||||
* @param string $params Path parameters
|
||||
* @return array
|
||||
*/
|
||||
public static function generateTestList($params) {
|
||||
|
|
|
@ -29,7 +29,7 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner {
|
|||
/**
|
||||
* Lets us pass in some options needed for CakePHP's webrunner.
|
||||
*
|
||||
* @param mixed $loader
|
||||
* @param mixed $loader The test suite loader
|
||||
* @param array $params list of options to be used for this run
|
||||
*/
|
||||
public function __construct($loader, $params) {
|
||||
|
@ -40,8 +40,8 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner {
|
|||
/**
|
||||
* Actually run a suite of tests. Cake initializes fixtures here using the chosen fixture manager
|
||||
*
|
||||
* @param PHPUnit_Framework_Test $suite
|
||||
* @param array $arguments
|
||||
* @param PHPUnit_Framework_Test $suite The test suite to run
|
||||
* @param array $arguments The CLI arguments
|
||||
* @return void
|
||||
*/
|
||||
public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array()) {
|
||||
|
@ -85,7 +85,7 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner {
|
|||
/**
|
||||
* Get the fixture manager class specified or use the default one.
|
||||
*
|
||||
* @param array $arguments
|
||||
* @param array $arguments The CLI arguments.
|
||||
* @return mixed instance of a fixture manager.
|
||||
* @throws RuntimeException When fixture manager class cannot be loaded.
|
||||
*/
|
||||
|
|
|
@ -48,6 +48,8 @@ class ControllerTestDispatcher extends Dispatcher {
|
|||
/**
|
||||
* Returns the test controller
|
||||
*
|
||||
* @param CakeRequest $request The request instance.
|
||||
* @param CakeResponse $response The response instance.
|
||||
* @return Controller
|
||||
*/
|
||||
protected function _getController($request, $response) {
|
||||
|
|
|
@ -44,10 +44,10 @@ class CakeTestModel extends Model {
|
|||
/**
|
||||
* Overriding save() to set CakeTestSuiteDispatcher::date() as formatter for created, modified and updated fields
|
||||
*
|
||||
* @param array $data
|
||||
* @param boolean|array $validate
|
||||
* @param array $fieldList
|
||||
* @return void
|
||||
* @param array $data Data to save
|
||||
* @param boolean|array $validate Validate or options.
|
||||
* @param array $fieldList Whitelist of fields
|
||||
* @return mixed
|
||||
*/
|
||||
public function save($data = null, $validate = true, $fieldList = array()) {
|
||||
$db = $this->getDataSource();
|
||||
|
|
Loading…
Add table
Reference in a new issue