Fix the test suite package doc block errors.

This commit is contained in:
mark_story 2014-06-05 00:19:27 -04:00
parent 7058921275
commit ab5da2a09f
5 changed files with 46 additions and 44 deletions

View file

@ -71,7 +71,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
* If no TestResult object is passed a new one will be created. * If no TestResult object is passed a new one will be created.
* This method is run for each test method in this class * 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 * @return PHPUnit_Framework_TestResult
* @throws InvalidArgumentException * @throws InvalidArgumentException
*/ */
@ -107,8 +107,8 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
/** /**
* Overrides SimpleTestCase::skipIf to provide a boolean return value * Overrides SimpleTestCase::skipIf to provide a boolean return value
* *
* @param boolean $shouldSkip * @param boolean $shouldSkip Whether or not the test should be skipped.
* @param string $message * @param string $message The message to display.
* @return boolean * @return boolean
*/ */
public function skipIf($shouldSkip, $message = '') { 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 * Chooses which fixtures to load for a given test
* *
* @param string $fixture Each parameter is a model name that corresponds to a * Each parameter is a model name that corresponds to a fixture, i.e. 'Post', 'Author', etc.
* fixture, i.e. 'Post', 'Author', etc. *
* @return void * @return void
* @see CakeTestCase::$autoFixtures * @see CakeTestCase::$autoFixtures
* @throws Exception when no fixture manager is available. * @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 $expected The expected value.
* @param string $result The actual 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 * @return boolean
*/ */
public function assertTextNotEquals($expected, $result, $message = '') { 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 $expected The expected value.
* @param string $result The actual 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 * @return boolean
*/ */
public function assertTextEquals($expected, $result, $message = '') { 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. * Asserts that a string starts with a given prefix, ignoring differences in newlines.
* Helpful for doing cross platform tests of blocks of text. * Helpful for doing cross platform tests of blocks of text.
* *
* @param string $prefix * @param string $prefix The prefix to check for.
* @param string $string * @param string $string The string to search in.
* @param string $message * @param string $message The message to use for failure.
* @return boolean * @return boolean
*/ */
public function assertTextStartsWith($prefix, $string, $message = '') { 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. * Asserts that a string starts not with a given prefix, ignoring differences in newlines.
* Helpful for doing cross platform tests of blocks of text. * Helpful for doing cross platform tests of blocks of text.
* *
* @param string $prefix * @param string $prefix The prefix to not find.
* @param string $string * @param string $string The string to search.
* @param string $message * @param string $message The message to use for failure.
* @return boolean * @return boolean
*/ */
public function assertTextStartsNotWith($prefix, $string, $message = '') { 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. * Asserts that a string ends with a given prefix, ignoring differences in newlines.
* Helpful for doing cross platform tests of blocks of text. * Helpful for doing cross platform tests of blocks of text.
* *
* @param string $suffix * @param string $suffix The suffix to find.
* @param string $string * @param string $string The string to search.
* @param string $message * @param string $message The message to use for failure.
* @return boolean * @return boolean
*/ */
public function assertTextEndsWith($suffix, $string, $message = '') { 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. * Asserts that a string ends not with a given prefix, ignoring differences in newlines.
* Helpful for doing cross platform tests of blocks of text. * Helpful for doing cross platform tests of blocks of text.
* *
* @param string $suffix * @param string $suffix The suffix to not find.
* @param string $string * @param string $string The string to search.
* @param string $message * @param string $message The message to use for failure.
* @return boolean * @return boolean
*/ */
public function assertTextEndsNotWith($suffix, $string, $message = '') { 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. * Assert that a string contains another string, ignoring differences in newlines.
* Helpful for doing cross platform tests of blocks of text. * Helpful for doing cross platform tests of blocks of text.
* *
* @param string $needle * @param string $needle The string to search for.
* @param string $haystack * @param string $haystack The string to search through.
* @param string $message * @param string $message The message to display on failure.
* @param boolean $ignoreCase * @param boolean $ignoreCase Whether or not the search should be case-sensitive.
* @return boolean * @return boolean
*/ */
public function assertTextContains($needle, $haystack, $message = '', $ignoreCase = false) { 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. * Assert that a text doesn't contain another text, ignoring differences in newlines.
* Helpful for doing cross platform tests of blocks of text. * Helpful for doing cross platform tests of blocks of text.
* *
* @param string $needle * @param string $needle The string to search for.
* @param string $haystack * @param string $haystack The string to search through.
* @param string $message * @param string $message The message to display on failure.
* @param boolean $ignoreCase * @param boolean $ignoreCase Whether or not the search should be case-sensitive.
* @return boolean * @return boolean
*/ */
public function assertTextNotContains($needle, $haystack, $message = '', $ignoreCase = false) { 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 * Mock a model, maintain fixtures and table association
* *
* @param string $model * @param string $model The model to get a mock for.
* @param mixed $methods * @param mixed $methods The list of methods to mock
* @param array $config * @param array $config The config data for the mock's constructor.
* @throws MissingModelException * @throws MissingModelException
* @return Model * @return Model
*/ */

View file

@ -30,8 +30,8 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
/** /**
* Load a file and find the first test case / suite in that file. * Load a file and find the first test case / suite in that file.
* *
* @param string $filePath * @param string $filePath The file path to load
* @param string $params * @param string $params Additional parameters
* @return ReflectionClass * @return ReflectionClass
*/ */
public function load($filePath, $params = '') { 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. * Convert path fragments used by CakePHP's test runner to absolute paths that can be fed to PHPUnit.
* *
* @param string $filePath * @param string $filePath The file path to load
* @param string $params * @param string $params Additional parameters
* @return void * @return void
*/ */
protected function _resolveTestFile($filePath, $params) { 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. * 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. * @return string The base path.
*/ */
protected static function _basePath($params) { protected static function _basePath($params) {
@ -81,7 +81,7 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader {
/** /**
* Get the list of files for the test listing. * Get the list of files for the test listing.
* *
* @param string $params * @param string $params Path parameters
* @return array * @return array
*/ */
public static function generateTestList($params) { public static function generateTestList($params) {

View file

@ -29,7 +29,7 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner {
/** /**
* Lets us pass in some options needed for CakePHP's webrunner. * 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 * @param array $params list of options to be used for this run
*/ */
public function __construct($loader, $params) { 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 * Actually run a suite of tests. Cake initializes fixtures here using the chosen fixture manager
* *
* @param PHPUnit_Framework_Test $suite * @param PHPUnit_Framework_Test $suite The test suite to run
* @param array $arguments * @param array $arguments The CLI arguments
* @return void * @return void
*/ */
public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array()) { 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. * 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. * @return mixed instance of a fixture manager.
* @throws RuntimeException When fixture manager class cannot be loaded. * @throws RuntimeException When fixture manager class cannot be loaded.
*/ */

View file

@ -48,6 +48,8 @@ class ControllerTestDispatcher extends Dispatcher {
/** /**
* Returns the test controller * Returns the test controller
* *
* @param CakeRequest $request The request instance.
* @param CakeResponse $response The response instance.
* @return Controller * @return Controller
*/ */
protected function _getController($request, $response) { protected function _getController($request, $response) {

View file

@ -44,10 +44,10 @@ class CakeTestModel extends Model {
/** /**
* Overriding save() to set CakeTestSuiteDispatcher::date() as formatter for created, modified and updated fields * Overriding save() to set CakeTestSuiteDispatcher::date() as formatter for created, modified and updated fields
* *
* @param array $data * @param array $data Data to save
* @param boolean|array $validate * @param boolean|array $validate Validate or options.
* @param array $fieldList * @param array $fieldList Whitelist of fields
* @return void * @return mixed
*/ */
public function save($data = null, $validate = true, $fieldList = array()) { public function save($data = null, $validate = true, $fieldList = array()) {
$db = $this->getDataSource(); $db = $this->getDataSource();