Skip to content

Commit

Permalink
Fix the test suite package doc block errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jun 5, 2014
1 parent 7058921 commit ab5da2a
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 44 deletions.
60 changes: 30 additions & 30 deletions lib/Cake/TestSuite/CakeTestCase.php
Expand Up @@ -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
*/
Expand Down Expand Up @@ -107,8 +107,8 @@ public function endTest($method) {
/**
* 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 = '') {
Expand Down Expand Up @@ -196,8 +196,8 @@ protected function assertPostConditions() {
/**
* 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.
Expand All @@ -218,7 +218,7 @@ public function loadFixtures() {
*
* @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 = '') {
Expand All @@ -233,7 +233,7 @@ public function assertTextNotEquals($expected, $result, $message = '') {
*
* @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 = '') {
Expand All @@ -246,9 +246,9 @@ public function assertTextEquals($expected, $result, $message = '') {
* 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 = '') {
Expand All @@ -261,9 +261,9 @@ public function assertTextStartsWith($prefix, $string, $message = '') {
* 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 = '') {
Expand All @@ -276,9 +276,9 @@ public function assertTextStartsNotWith($prefix, $string, $message = '') {
* 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 = '') {
Expand All @@ -291,9 +291,9 @@ public function assertTextEndsWith($suffix, $string, $message = '') {
* 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 = '') {
Expand All @@ -306,10 +306,10 @@ public function assertTextEndsNotWith($suffix, $string, $message = '') {
* 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) {
Expand All @@ -322,10 +322,10 @@ public function assertTextContains($needle, $haystack, $message = '', $ignoreCas
* 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) {
Expand Down Expand Up @@ -712,9 +712,9 @@ protected function skipUnless($condition, $message = '') {
/**
* 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
*/
Expand Down
12 changes: 6 additions & 6 deletions lib/Cake/TestSuite/CakeTestLoader.php
Expand Up @@ -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 = '') {
Expand All @@ -42,8 +42,8 @@ public function load($filePath, $params = '') {
/**
* 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) {
Expand All @@ -55,7 +55,7 @@ protected function _resolveTestFile($filePath, $params) {
/**
* 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) {
Expand All @@ -81,7 +81,7 @@ protected static function _basePath($params) {
/**
* Get the list of files for the test listing.
*
* @param string $params
* @param string $params Path parameters
* @return array
*/
public static function generateTestList($params) {
Expand Down
8 changes: 4 additions & 4 deletions lib/Cake/TestSuite/CakeTestRunner.php
Expand Up @@ -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) {
Expand All @@ -40,8 +40,8 @@ public function __construct($loader, $params) {
/**
* 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()) {
Expand Down Expand Up @@ -85,7 +85,7 @@ protected function createTestResult() {
/**
* 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.
*/
Expand Down
2 changes: 2 additions & 0 deletions lib/Cake/TestSuite/ControllerTestCase.php
Expand Up @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions lib/Cake/TestSuite/Fixture/CakeTestModel.php
Expand Up @@ -44,10 +44,10 @@ public function __construct($id = false, $table = null, $ds = null) {
/**
* 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();
Expand Down

0 comments on commit ab5da2a

Please sign in to comment.