Merge branch 'master' into 2.5

Conflicts:
	lib/Cake/Test/Case/Utility/FileTest.php
	lib/Cake/VERSION.txt
This commit is contained in:
Jose Lorenzo Rodriguez 2014-04-06 21:50:41 +02:00
commit 343d3279b9
65 changed files with 348 additions and 37 deletions

View file

@ -593,7 +593,7 @@ class ModelTask extends BakeTask {
public function findBelongsTo(Model $model, $associations) {
$fieldNames = array_keys($model->schema(true));
foreach ($fieldNames as $fieldName) {
$offset = strpos($fieldName, '_id');
$offset = substr($fieldName, -3) === '_id';
if ($fieldName != $model->primaryKey && $fieldName !== 'parent_id' && $offset !== false) {
$tmpModelName = $this->_modelNameFromKey($fieldName);
$associations['belongsTo'][] = array(

View file

@ -172,7 +172,7 @@ class TestShell extends Shell {
$this->_dispatcher = new CakeTestSuiteDispatcher();
$success = $this->_dispatcher->loadTestFramework();
if (!$success) {
throw new Exception(__d('cake_dev', 'Please install PHPUnit framework <info>(http://www.phpunit.de)</info>'));
throw new Exception(__d('cake_dev', 'Please install PHPUnit framework v3.7 <info>(http://www.phpunit.de)</info>'));
}
}

View file

@ -1075,7 +1075,6 @@ class Controller extends Object implements CakeEventListener {
* @param array $whitelist List of allowed options for paging
* @return array Model query results
* @link http://book.cakephp.org/2.0/en/controllers.html#Controller::paginate
* @deprecated Will be removed in 3.0. Use PaginatorComponent instead.
*/
public function paginate($object = null, $scope = array(), $whitelist = array()) {
return $this->Components->load('Paginator', $this->paginate)->paginate($object, $scope, $whitelist);

View file

@ -1645,21 +1645,21 @@ class CakeEmail {
$View->plugin = $layoutPlugin;
}
// Convert null to false, as View needs false to disable
// the layout.
if ($layout === null) {
$layout = false;
}
if ($View->get('content') === null) {
$View->set('content', $content);
}
// Convert null to false, as View needs false to disable
// the layout.
if ($this->_layout === null) {
$this->_layout = false;
}
foreach ($types as $type) {
$View->hasRendered = false;
$View->viewPath = $View->layoutPath = 'Emails' . DS . $type;
$render = $View->render($template, $layout);
$render = $View->render($this->_template, $this->_layout);
$render = str_replace(array("\r\n", "\r"), "\n", $render);
$rendered[$type] = $this->_encodeString($render, $this->charset);
}

View file

@ -248,6 +248,8 @@ class CacheTest extends CakeTestCase {
/**
* testGroupConfigs method
*
* @return void
*/
public function testGroupConfigs() {
Cache::config('latest', array(
@ -301,7 +303,9 @@ class CacheTest extends CakeTestCase {
/**
* testGroupConfigsThrowsException method
*
* @expectedException CacheException
* @return void
*/
public function testGroupConfigsThrowsException() {
Cache::groupConfigs('bogus');

View file

@ -453,6 +453,8 @@ class FileEngineTest extends CakeTestCase {
/**
* Test that clearing with repeat writes works properly
*
* @return void
*/
public function testClearingWithRepeatWrites() {
Cache::config('repeat', array(

View file

@ -534,6 +534,8 @@ class TestTaskTest extends CakeTestCase {
/**
* Test generateUses()
*
* @return void
*/
public function testGenerateUses() {
$result = $this->Task->generateUses('model', 'Model', 'Post');

View file

@ -258,6 +258,7 @@ class ConsoleOptionParserTest extends CakeTestCase {
* test parsing options that do not exist.
*
* @expectedException ConsoleException
* @return void
*/
public function testOptionThatDoesNotExist() {
$parser = new ConsoleOptionParser('test', false);
@ -270,6 +271,7 @@ class ConsoleOptionParserTest extends CakeTestCase {
* test parsing short options that do not exist.
*
* @expectedException ConsoleException
* @return void
*/
public function testShortOptionThatDoesNotExist() {
$parser = new ConsoleOptionParser('test', false);

View file

@ -840,6 +840,8 @@ TEXT;
/**
* Test file and console and logging
*
* @return void
*/
public function testFileAndConsoleLogging() {
// file logging
@ -886,6 +888,8 @@ TEXT;
/**
* Test file and console and logging quiet output
*
* @return void
*/
public function testQuietLog() {
$output = $this->getMock('ConsoleOutput', array(), array(), '', false);

View file

@ -29,6 +29,8 @@ class PhpAclTest extends CakeTestCase {
/**
* Setup
*
* @return void
*/
public function setUp() {
parent::setUp();
@ -44,6 +46,8 @@ class PhpAclTest extends CakeTestCase {
/**
* Test role inheritance
*
* @return void
*/
public function testRoleInheritance() {
$roles = $this->Acl->Aro->roles('User/peter');
@ -58,7 +62,9 @@ class PhpAclTest extends CakeTestCase {
}
/**
* Tst adding a role
* Test adding a role
*
* @return void
*/
public function testAddRole() {
$this->assertEquals(array(array(PhpAro::DEFAULT_ROLE)), $this->Acl->Aro->roles('foobar'));
@ -68,6 +74,8 @@ class PhpAclTest extends CakeTestCase {
/**
* Test resolving ARO
*
* @return void
*/
public function testAroResolve() {
$this->Acl->Aro->map = array(
@ -92,6 +100,8 @@ class PhpAclTest extends CakeTestCase {
/**
* test correct resolution of defined aliases
*
* @return void
*/
public function testAroAliases() {
$this->Acl->Aro->map = array(
@ -193,6 +203,8 @@ class PhpAclTest extends CakeTestCase {
/**
* lhs of defined rules are case insensitive
*
* @return void
*/
public function testCheckIsCaseInsensitive() {
$this->assertTrue($this->Acl->check('hardy', 'controllers/forms/new'));
@ -203,6 +215,8 @@ class PhpAclTest extends CakeTestCase {
/**
* allow should work in-memory
*
* @return void
*/
public function testAllow() {
$this->assertFalse($this->Acl->check('jeff', 'foo/bar'));
@ -223,6 +237,8 @@ class PhpAclTest extends CakeTestCase {
/**
* deny should work in-memory
*
* @return void
*/
public function testDeny() {
$this->assertTrue($this->Acl->check('stan', 'controllers/baz/manager_foo'));
@ -237,6 +253,8 @@ class PhpAclTest extends CakeTestCase {
/**
* test that a deny rule wins over an equally specific allow rule
*
* @return void
*/
public function testDenyRuleIsStrongerThanAllowRule() {
$this->assertFalse($this->Acl->check('peter', 'baz/bam'));
@ -261,6 +279,8 @@ class PhpAclTest extends CakeTestCase {
/**
* test that an invalid configuration throws exception
*
* @return void
*/
public function testInvalidConfigWithAroMissing() {
$this->setExpectedException(
@ -286,6 +306,8 @@ class PhpAclTest extends CakeTestCase {
/**
* test resolving of ACOs
*
* @return void
*/
public function testAcoResolve() {
$this->assertEquals(array('foo', 'bar'), $this->Acl->Aco->resolve('foo/bar'));
@ -305,6 +327,8 @@ class PhpAclTest extends CakeTestCase {
/**
* test that declaring cyclic dependencies should give an error when building the tree
*
* @return void
*/
public function testAroDeclarationContainsCycles() {
$config = array(
@ -328,6 +352,8 @@ class PhpAclTest extends CakeTestCase {
/**
* test that with policy allow, only denies count
*
* @return void
*/
public function testPolicy() {
// allow by default
@ -344,4 +370,5 @@ class PhpAclTest extends CakeTestCase {
$this->assertFalse($this->Acl->check('Role/sales', 'controllers/bar/delete'));
$this->assertFalse($this->Acl->check('Role/sales', 'controllers/bar', 'delete'));
}
}

View file

@ -46,6 +46,7 @@ class ControllerAuthorizeTest extends CakeTestCase {
/**
* @expectedException PHPUnit_Framework_Error
* @return void
*/
public function testControllerTypeError() {
$this->auth->controller(new StdClass());
@ -53,6 +54,7 @@ class ControllerAuthorizeTest extends CakeTestCase {
/**
* @expectedException CakeException
* @return void
*/
public function testControllerErrorOnMissingMethod() {
$this->auth->controller(new Controller());
@ -85,4 +87,5 @@ class ControllerAuthorizeTest extends CakeTestCase {
$this->assertTrue($this->auth->authorize($user, $request));
}
}

View file

@ -628,6 +628,8 @@ class CookieComponentTest extends CakeTestCase {
/**
* Test reading empty values.
*
* @return void
*/
public function testReadEmpty() {
$_COOKIE['CakeTestCookie'] = array(

View file

@ -863,6 +863,8 @@ HTMLBLOC;
/**
* Make sure from/to are not double encoded when UTF-8 is present
*
* @return void
*/
public function testEncodingFrom() {
$this->Controller->EmailTest->to = 'Teßt <test@example.com>';

View file

@ -677,6 +677,7 @@ class PaginatorComponentTest extends CakeTestCase {
* Tests for missing models
*
* @expectedException MissingModelException
* @return void
*/
public function testPaginateMissingModel() {
$Controller = new PaginatorTestController($this->request);

View file

@ -172,6 +172,7 @@ class SecurityComponentTest extends CakeTestCase {
* visibility keyword in the blackhole callback
*
* @expectedException BadRequestException
* @return void
*/
public function testBlackholeWithBrokenCallback() {
$request = new CakeRequest('posts/index', false);
@ -830,7 +831,7 @@ class SecurityComponentTest extends CakeTestCase {
/**
* Test that validatePost fails when unlocked fields are changed.
*
* @return
* @return void
*/
public function testValidatePostFailDisabledFieldTampering() {
$this->Controller->Security->startup($this->Controller);

View file

@ -64,6 +64,7 @@ class ScaffoldMockControllerWithFields extends Controller {
* function beforeScaffold
*
* @param string method
* @return boolean true
*/
public function beforeScaffold($method) {
$this->set('scaffoldFields', array('title'));
@ -82,7 +83,8 @@ class TestScaffoldMock extends Scaffold {
/**
* Overload _scaffold
*
* @param unknown_type $params
* @param CakeRequest $request
* @return void
*/
protected function _scaffold(CakeRequest $request) {
$this->_params = $request;

View file

@ -362,6 +362,8 @@ class AppTest extends CakeTestCase {
/**
* Make sure that .svn and friends are excluded from App::objects('plugin')
*
* @return void
*/
public function testListObjectsIgnoreDotDirectories() {
$path = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS;
@ -793,6 +795,7 @@ class AppTest extends CakeTestCase {
* Tests that the automatic class loader will also find in "libs" folder for both
* app and plugins if it does not find the class in other configured paths
*
* @return void
*/
public function testLoadClassInLibs() {
App::build(array(

View file

@ -436,6 +436,7 @@ class ConfigureTest extends CakeTestCase {
/**
* @expectedException ConfigureException
* @return void
*/
public function testDumpNoAdapter() {
Configure::dump(TMP . 'test.php', 'does_not_exist');

View file

@ -270,6 +270,8 @@ class ExceptionRendererTest extends CakeTestCase {
/**
* test that helpers in custom CakeErrorController are not lost
*
* @return void
*/
public function testCakeErrorHelpersNotLost() {
$testApp = CAKE . 'Test' . DS . 'test_app' . DS;

View file

@ -257,6 +257,7 @@ class CakeLogTest extends CakeTestCase {
* test enable
*
* @expectedException CakeLogException
* @return void
*/
public function testStreamEnable() {
CakeLog::config('spam', array(
@ -272,6 +273,7 @@ class CakeLogTest extends CakeTestCase {
* test disable
*
* @expectedException CakeLogException
* @return void
*/
public function testStreamDisable() {
CakeLog::config('spam', array(
@ -289,6 +291,7 @@ class CakeLogTest extends CakeTestCase {
* test enabled() invalid stream
*
* @expectedException CakeLogException
* @return void
*/
public function testStreamEnabledInvalid() {
CakeLog::enabled('bogus_stream');
@ -298,11 +301,17 @@ class CakeLogTest extends CakeTestCase {
* test disable invalid stream
*
* @expectedException CakeLogException
* @return void
*/
public function testStreamDisableInvalid() {
CakeLog::disable('bogus_stream');
}
/**
* resets log config
*
* @return void
*/
protected function _resetLogConfig() {
CakeLog::config('debug', array(
'engine' => 'File',
@ -316,6 +325,11 @@ class CakeLogTest extends CakeTestCase {
));
}
/**
* delete logs
*
* @return void
*/
protected function _deleteLogs() {
if (file_exists(LOGS . 'shops.log')) {
unlink(LOGS . 'shops.log');
@ -493,6 +507,7 @@ class CakeLogTest extends CakeTestCase {
/**
* test bogus type and scope
*
* @return void
*/
public function testBogusTypeAndScope() {
$this->_resetLogConfig();
@ -524,6 +539,8 @@ class CakeLogTest extends CakeTestCase {
/**
* test scoped logging with convenience methods
*
* @return void
*/
public function testConvenienceScopedLogging() {
if (file_exists(LOGS . 'shops.log')) {
@ -570,6 +587,8 @@ class CakeLogTest extends CakeTestCase {
/**
* test convenience methods
*
* @return void
*/
public function testConvenienceMethods() {
$this->_deleteLogs();
@ -644,6 +663,8 @@ class CakeLogTest extends CakeTestCase {
/**
* test levels customization
*
* @return void
*/
public function testLevelCustomization() {
$this->skipIf(DIRECTORY_SEPARATOR === '\\', 'Log level tests not supported on Windows.');
@ -674,6 +695,8 @@ class CakeLogTest extends CakeTestCase {
/**
* Test writing log files with custom levels
*
* @return void
*/
public function testCustomLevelWrites() {
$this->_deleteLogs();

View file

@ -73,6 +73,8 @@ class ConsoleLogTest extends CakeTestCase {
/**
* Test writing to ConsoleOutput
*
* @return void
*/
public function testConsoleOutputWrites() {
TestCakeLog::config('test_console_log', array(
@ -92,6 +94,8 @@ class ConsoleLogTest extends CakeTestCase {
/**
* Test logging to both ConsoleLog and FileLog
*
* @return void
*/
public function testCombinedLogWriting() {
TestCakeLog::config('test_console_log', array(
@ -128,6 +132,8 @@ class ConsoleLogTest extends CakeTestCase {
/**
* test default value of stream 'outputAs'
*
* @return void
*/
public function testDefaultOutputAs() {
TestCakeLog::config('test_console_log', array(

View file

@ -122,6 +122,7 @@ class AclUser extends CakeTestModel {
/**
* parentNode
*
* @return null
*/
public function parentNode() {
return null;
@ -160,6 +161,7 @@ class AclPost extends CakeTestModel {
/**
* parentNode
*
* @return null
*/
public function parentNode() {
return null;

View file

@ -43,6 +43,7 @@ class ContainableBehaviorTest extends CakeTestCase {
/**
* Method executed before each test
*
* @return void
*/
public function setUp() {
parent::setUp();
@ -68,6 +69,7 @@ class ContainableBehaviorTest extends CakeTestCase {
/**
* Method executed after each test
*
* @return void
*/
public function tearDown() {
unset($this->Article);
@ -3388,6 +3390,7 @@ class ContainableBehaviorTest extends CakeTestCase {
/**
* testResetAddedAssociation method
*
* @return void
*/
public function testResetAddedAssociation() {
$this->assertTrue(empty($this->Article->hasMany['ArticlesTag']));
@ -3429,6 +3432,7 @@ class ContainableBehaviorTest extends CakeTestCase {
/**
* testResetAssociation method
*
* @return void
*/
public function testResetAssociation() {
$this->Article->Behaviors->load('Containable');
@ -3460,6 +3464,7 @@ class ContainableBehaviorTest extends CakeTestCase {
/**
* testResetDeeperHasOneAssociations method
*
* @return void
*/
public function testResetDeeperHasOneAssociations() {
$this->Article->User->unbindModel(array(
@ -3520,6 +3525,7 @@ class ContainableBehaviorTest extends CakeTestCase {
/**
* testResetMultipleHabtmAssociations method
*
* @return void
*/
public function testResetMultipleHabtmAssociations() {
$articleHabtm = array(
@ -3610,6 +3616,8 @@ class ContainableBehaviorTest extends CakeTestCase {
/**
* test that bindModel and unbindModel work with find() calls in between.
*
* @return void
*/
public function testBindMultipleTimesWithFind() {
$binding = array(

View file

@ -416,6 +416,8 @@ class TranslateBehaviorTest extends CakeTestCase {
/**
* Test loading fields with 0 as the translated value.
*
* @return void
*/
public function testFetchTranslationsWithZero() {
$this->loadFixtures('Translate', 'TranslatedItem');

View file

@ -476,6 +476,7 @@ class BehaviorCollectionTest extends CakeTestCase {
/**
* Test load() with enabled => false
*
* @return void
*/
public function testLoadDisabled() {
$Apple = new Apple();
@ -488,6 +489,8 @@ class BehaviorCollectionTest extends CakeTestCase {
/**
* Tests loading aliased behaviors
*
* @return void
*/
public function testLoadAlias() {
$Apple = new Apple();
@ -1189,6 +1192,8 @@ class BehaviorCollectionTest extends CakeTestCase {
/**
* Test that behavior priority
*
* @return void
*/
public function testBehaviorOrderCallbacks() {
$model = ClassRegistry::init('Orangutan');

View file

@ -58,6 +58,7 @@ class MysqlTest extends CakeTestCase {
/**
* Sets up a Dbo class instance for testing
*
* @return void
*/
public function setUp() {
parent::setUp();
@ -73,6 +74,7 @@ class MysqlTest extends CakeTestCase {
/**
* Sets up a Dbo class instance for testing
*
* @return void
*/
public function tearDown() {
parent::tearDown();
@ -85,6 +87,7 @@ class MysqlTest extends CakeTestCase {
* Test Dbo value method
*
* @group quoting
* @return void
*/
public function testQuoting() {
$result = $this->Dbo->fields($this->model);

View file

@ -211,6 +211,7 @@ class PostgresTest extends CakeTestCase {
/**
* Sets up a Dbo class instance for testing
*
* @return void
*/
public function setUp() {
parent::setUp();
@ -224,6 +225,7 @@ class PostgresTest extends CakeTestCase {
/**
* Sets up a Dbo class instance for testing
*
* @return void
*/
public function tearDown() {
parent::tearDown();
@ -234,6 +236,7 @@ class PostgresTest extends CakeTestCase {
/**
* Test field quoting method
*
* @return void
*/
public function testFieldQuoting() {
$fields = array(

View file

@ -89,6 +89,7 @@ class SqliteTest extends CakeTestCase {
/**
* Sets up a Dbo class instance for testing
*
* @return void
*/
public function setUp() {
parent::setUp();
@ -102,6 +103,7 @@ class SqliteTest extends CakeTestCase {
/**
* Sets up a Dbo class instance for testing
*
* @return void
*/
public function tearDown() {
parent::tearDown();
@ -111,6 +113,7 @@ class SqliteTest extends CakeTestCase {
/**
* Tests that SELECT queries from DboSqlite::listSources() are not cached
*
* @return void
*/
public function testTableListCacheDisabling() {
$this->assertFalse(in_array('foo_test', $this->Dbo->listSources()));
@ -157,6 +160,7 @@ class SqliteTest extends CakeTestCase {
/**
* Tests that cached table descriptions are saved under the sanitized key name
*
* @return void
*/
public function testCacheKeyName() {
Configure::write('Cache.disable', false);

View file

@ -262,6 +262,7 @@ class SqlserverTest extends CakeTestCase {
/**
* Sets up a Dbo class instance for testing
*
* @return void
*/
public function setUp() {
parent::setUp();

View file

@ -998,6 +998,8 @@ class DboSourceTest extends CakeTestCase {
/**
* Test getting the last error.
*
* @return void
*/
public function testLastError() {
$stmt = $this->getMock('PDOStatement');

View file

@ -29,6 +29,8 @@ class DboMock extends DboSource {
/**
* Returns the $field without modifications
*
* @return string
*/
public function name($field) {
return $field;
@ -36,6 +38,8 @@ class DboMock extends DboSource {
/**
* Returns true to fake a database connection
*
* @return boolean true
*/
public function connect() {
return true;
@ -277,6 +281,8 @@ class ModelIntegrationTest extends BaseModelTest {
* Tests cross database joins. Requires $test and $test2 to both be set in DATABASE_CONFIG
* NOTE: When testing on MySQL, you must set 'persistent' => false on *both* database connections,
* or one connection will step on the other.
*
* @return void
*/
public function testCrossDatabaseJoins() {
$config = ConnectionManager::enumConnectionObjects();

View file

@ -7831,6 +7831,7 @@ class ModelReadTest extends BaseModelTest {
* Test correct fetching of virtual fields
* currently is not possible to do Relation.virtualField
*
* @return void
*/
public function testVirtualFieldsMysql() {
$this->skipIf(!($this->db instanceof Mysql), 'The rest of virtualFields test only compatible with Mysql.');

View file

@ -2078,7 +2078,7 @@ class ModelValidationTest extends BaseModelTest {
/**
* testValidateFirstWithDefaults method
*
* return @void
* @return void
*/
public function testFirstWithDefaults() {
$this->loadFixtures('Article', 'Tag', 'Comment', 'User', 'ArticlesTag');

View file

@ -40,6 +40,7 @@ class TestAuthor extends Author {
* Helper method to set a datasource object
*
* @param Object $object The datasource object
* @return void
*/
public function setDataSourceObject($object) {
$this->_dataSourceObject = $object;
@ -77,6 +78,7 @@ class TestPost extends Post {
* Helper method to set a datasource object
*
* @param Object $object The datasource object
* @return void
*/
public function setDataSourceObject($object) {
$this->_dataSourceObject = $object;
@ -365,6 +367,8 @@ class ModelWriteTest extends BaseModelTest {
/**
* test that save() resets whitelist on failed save
*
* @return void
*/
public function testSaveFieldListResetsWhitelistOnFailedSave() {
$this->loadFixtures('Bidding');
@ -6784,7 +6788,7 @@ class ModelWriteTest extends BaseModelTest {
/**
* testSaveAllFieldListHasMany method
*
* return @void
* @return void
*/
public function testSaveAllFieldListHasMany() {
$this->loadFixtures('Article', 'Comment');
@ -6971,7 +6975,7 @@ class ModelWriteTest extends BaseModelTest {
/**
* testSaveAllDeepFieldListHasMany method
*
* return @void
* @return void
*/
public function testSaveAllDeepFieldListHasMany() {
$this->loadFixtures('Article', 'Comment', 'User');
@ -7014,7 +7018,7 @@ class ModelWriteTest extends BaseModelTest {
/**
* testSaveAllDeepHasManyBelongsTo method
*
* return @void
* @return void
*/
public function testSaveAllDeepHasManyBelongsTo() {
$this->loadFixtures('Article', 'Comment', 'User');
@ -7066,7 +7070,7 @@ class ModelWriteTest extends BaseModelTest {
/**
* testSaveAllDeepHasManyhasMany method
*
* return @void
* @return void
*/
public function testSaveAllDeepHasManyHasMany() {
$this->loadFixtures('Article', 'Comment', 'User', 'Attachment');
@ -7122,7 +7126,7 @@ class ModelWriteTest extends BaseModelTest {
/**
* testSaveAllDeepOrderHasManyHasMany method
*
* return @void
* @return void
*/
public function testSaveAllDeepOrderHasManyHasMany() {
$this->loadFixtures('Article', 'Comment', 'User', 'Attachment');
@ -7159,7 +7163,7 @@ class ModelWriteTest extends BaseModelTest {
/**
* testSaveAllDeepEmptyHasManyHasMany method
*
* return @void
* @return void
*/
public function testSaveAllDeepEmptyHasManyHasMany() {
$this->skipIf(!$this->db instanceof Mysql, 'This test is only compatible with Mysql.');
@ -7197,7 +7201,7 @@ class ModelWriteTest extends BaseModelTest {
/**
* testUpdateAllBoolean
*
* return @void
* @return void
*/
public function testUpdateAllBoolean() {
$this->loadFixtures('Item', 'Syfile', 'Portfolio', 'Image', 'ItemsPortfolio');
@ -7212,7 +7216,7 @@ class ModelWriteTest extends BaseModelTest {
/**
* testUpdateAllBooleanConditions
*
* return @void
* @return void
*/
public function testUpdateAllBooleanConditions() {
$this->loadFixtures('Item', 'Syfile', 'Portfolio', 'Image', 'ItemsPortfolio');
@ -7229,7 +7233,7 @@ class ModelWriteTest extends BaseModelTest {
/**
* testUpdateBoolean
*
* return @void
* @return void
*/
public function testUpdateBoolean() {
$this->loadFixtures('Item', 'Syfile', 'Portfolio', 'Image', 'ItemsPortfolio');

View file

@ -929,6 +929,10 @@ class Post extends CakeTestModel {
*/
public $belongsTo = array('Author');
/**
* @param array $queryData
* @return boolean true
*/
public function beforeFind($queryData) {
if (isset($queryData['connection'])) {
$this->useDbConfig = $queryData['connection'];
@ -936,6 +940,11 @@ class Post extends CakeTestModel {
return true;
}
/**
* @param array $results
* @param boolean $primary
* @return array $results
*/
public function afterFind($results, $primary = false) {
$this->useDbConfig = 'test';
return $results;
@ -2763,6 +2772,11 @@ class AfterTree extends NumberTree {
*/
public $actsAs = array('Tree');
/**
* @param boolean $created
* @param array $options
* @return void
*/
public function afterSave($created, $options = array()) {
if ($created && isset($this->data['AfterTree'])) {
$this->data['AfterTree']['name'] = 'Six and One Half Changed in AfterTree::afterSave() but not in database';

View file

@ -612,6 +612,8 @@ class CakeRequestTest extends CakeTestCase {
/**
* Test that files in the 0th index work.
*
* @return void
*/
public function testFilesZeroithIndex() {
$_FILES = array(
@ -1303,6 +1305,7 @@ class CakeRequestTest extends CakeTestCase {
* - index.php/bananas/eat/tasty_banana
*
* @link https://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/3318
* @return void
*/
public function testBaseUrlWithModRewriteAndIndexPhp() {
$_SERVER['REQUEST_URI'] = '/cakephp/app/webroot/index.php';

View file

@ -47,6 +47,7 @@ class CakeResponseTest extends CakeTestCase {
/**
* Tests the request object constructor
*
* @return void
*/
public function testConstruct() {
$response = new CakeResponse();
@ -86,6 +87,7 @@ class CakeResponseTest extends CakeTestCase {
/**
* Tests the body method
*
* @return void
*/
public function testBody() {
$response = new CakeResponse();
@ -98,6 +100,7 @@ class CakeResponseTest extends CakeTestCase {
/**
* Tests the charset method
*
* @return void
*/
public function testCharset() {
$response = new CakeResponse();
@ -111,6 +114,7 @@ class CakeResponseTest extends CakeTestCase {
* Tests the statusCode method
*
* @expectedException CakeException
* @return void
*/
public function testStatusCode() {
$response = new CakeResponse();
@ -126,6 +130,7 @@ class CakeResponseTest extends CakeTestCase {
/**
* Tests the type method
*
* @return void
*/
public function testType() {
$response = new CakeResponse();
@ -148,6 +153,7 @@ class CakeResponseTest extends CakeTestCase {
/**
* Tests the header method
*
* @return void
*/
public function testHeader() {
$response = new CakeResponse();
@ -196,6 +202,7 @@ class CakeResponseTest extends CakeTestCase {
/**
* Tests the send method
*
* @return void
*/
public function testSend() {
$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent', '_setCookies'));
@ -241,7 +248,9 @@ class CakeResponseTest extends CakeTestCase {
/**
* Tests the send method and changing the content type
*
* @dataProvider charsetTypeProvider
* @return void
*/
public function testSendChangingContentType($original, $expected) {
$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent', '_setCookies'));
@ -261,6 +270,7 @@ class CakeResponseTest extends CakeTestCase {
/**
* Tests the send method and changing the content type to JS without adding the charset
*
* @return void
*/
public function testSendChangingContentTypeWithoutCharset() {
$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent', '_setCookies'));
@ -282,6 +292,7 @@ class CakeResponseTest extends CakeTestCase {
/**
* Tests the send method and changing the content type
*
* @return void
*/
public function testSendWithLocation() {
$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent', '_setCookies'));
@ -299,6 +310,7 @@ class CakeResponseTest extends CakeTestCase {
/**
* Tests the disableCache method
*
* @return void
*/
public function testDisableCache() {
$response = new CakeResponse();
@ -314,6 +326,7 @@ class CakeResponseTest extends CakeTestCase {
/**
* Tests the cache method
*
* @return void
*/
public function testCache() {
$response = new CakeResponse();
@ -386,6 +399,7 @@ class CakeResponseTest extends CakeTestCase {
* Tests the httpCodes method
*
* @expectedException CakeException
* @return void
*/
public function testHttpCodes() {
$response = new CakeResponse();
@ -430,6 +444,7 @@ class CakeResponseTest extends CakeTestCase {
/**
* Tests the download method
*
* @return void
*/
public function testDownload() {
$response = new CakeResponse();
@ -443,6 +458,7 @@ class CakeResponseTest extends CakeTestCase {
/**
* Tests the mapType method
*
* @return void
*/
public function testMapType() {
$response = new CakeResponse();
@ -459,6 +475,7 @@ class CakeResponseTest extends CakeTestCase {
/**
* Tests the outputCompressed method
*
* @return void
*/
public function testOutputCompressed() {
$response = new CakeResponse();
@ -496,6 +513,7 @@ class CakeResponseTest extends CakeTestCase {
/**
* Tests the send and setting of Content-Length
*
* @return void
*/
public function testSendContentLength() {
$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent'));

View file

@ -118,7 +118,7 @@ class CakeSocketTest extends CakeTestCase {
*
* @dataProvider invalidConnections
* @expectedException SocketException
* return void
* @return void
*/
public function testInvalidConnection($data) {
$this->Socket->config = array_merge($this->Socket->config, $data);

View file

@ -42,6 +42,7 @@ class TestCakeEmail extends CakeEmail {
/**
* Wrap to protected method
*
* @return array
*/
public function formatAddress($address) {
return parent::_formatAddress($address);
@ -50,6 +51,7 @@ class TestCakeEmail extends CakeEmail {
/**
* Wrap to protected method
*
* @return array
*/
public function wrap($text, $length = CakeEmail::LINE_LENGTH_MUST) {
return parent::_wrap($text, $length);
@ -67,6 +69,7 @@ class TestCakeEmail extends CakeEmail {
/**
* Encode to protected method
*
* @return string
*/
public function encode($text) {
return $this->_encode($text);
@ -75,6 +78,7 @@ class TestCakeEmail extends CakeEmail {
/**
* Render to protected method
*
* @return array
*/
public function render($content) {
return $this->_render($content);
@ -82,7 +86,7 @@ class TestCakeEmail extends CakeEmail {
}
/*
/**
* EmailConfig class
*
*/
@ -91,7 +95,7 @@ class TestEmailConfig {
/**
* test config
*
* @var string
* @var array
*/
public $test = array(
'from' => array('some@example.com' => 'My website'),
@ -105,7 +109,7 @@ class TestEmailConfig {
/**
* test config 2
*
* @var string
* @var array
*/
public $test2 = array(
'from' => array('some@example.com' => 'My website'),
@ -118,7 +122,7 @@ class TestEmailConfig {
}
/*
/**
* ExtendTransport class
* test class to ensure the class has send() method
*
@ -339,6 +343,8 @@ class CakeEmailTest extends CakeTestCase {
/**
* Tests that it is possible set custom email validation
*
* @return void
*/
public function testCustomEmailValidation() {
$regex = '/^[\.a-z0-9!#$%&\'*+\/=?^_`{|}~-]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]{2,6}$/i';
@ -1469,7 +1475,7 @@ class CakeEmailTest extends CakeTestCase {
App::build(array(
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
CakePlugin::load('TestPlugin');
CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
$this->CakeEmail->reset();
$this->CakeEmail->transport('debug');
@ -1490,6 +1496,14 @@ class CakeEmailTest extends CakeTestCase {
$this->assertContains('Into TestPlugin.', $result['message']);
$this->assertContains('This email was sent using the TestPlugin.', $result['message']);
$this->CakeEmail->template(
'TestPlugin.test_plugin_tpl',
'TestPluginTwo.default'
);
$result = $this->CakeEmail->send();
$this->assertContains('Into TestPlugin.', $result['message']);
$this->assertContains('This email was sent using TestPluginTwo.', $result['message']);
// test plugin template overridden by theme
$this->CakeEmail->theme('TestTheme');
$result = $this->CakeEmail->send();
@ -2054,6 +2068,8 @@ class CakeEmailTest extends CakeTestCase {
* Tests for compatible check.
* charset property and charset() method.
* headerCharset property and headerCharset() method.
*
* @return void
*/
public function testCharsetsCompatible() {
$this->skipIf(!function_exists('mb_convert_encoding'));
@ -2105,6 +2121,11 @@ class CakeEmailTest extends CakeTestCase {
$this->assertSame($oldStyleHeaders['Subject'], $newStyleHeaders['Subject']);
}
/**
* @param mixed $charset
* @param mixed $headerCharset
* @return CakeEmail
*/
protected function _getEmailByOldStyleCharset($charset, $headerCharset) {
$email = new CakeEmail(array('transport' => 'Debug'));
@ -2124,6 +2145,11 @@ class CakeEmailTest extends CakeTestCase {
return $email;
}
/**
* @param mixed $charset
* @param mixed $headerCharset
* @return CakeEmail
*/
protected function _getEmailByNewStyleCharset($charset, $headerCharset) {
$email = new CakeEmail(array('transport' => 'Debug'));
@ -2143,6 +2169,11 @@ class CakeEmailTest extends CakeTestCase {
return $email;
}
/**
* testWrapLongLine()
*
* @return void
*/
public function testWrapLongLine() {
$message = '<a href="http://cakephp.org">' . str_repeat('x', CakeEmail::LINE_LENGTH_MUST) . "</a>";
@ -2183,6 +2214,11 @@ class CakeEmailTest extends CakeTestCase {
$this->assertLineLengths($result['message']);
}
/**
* testWrapWithTagsAcrossLines()
*
* @return void
*/
public function testWrapWithTagsAcrossLines() {
$str = <<<HTML
<table>
@ -2207,6 +2243,11 @@ HTML;
$this->assertLineLengths($result['message']);
}
/**
* CakeEmailTest::testWrapIncludeLessThanSign()
*
* @return void
*/
public function testWrapIncludeLessThanSign() {
$str = 'foo<bar';
$length = strlen($str);
@ -2225,6 +2266,11 @@ HTML;
$this->assertLineLengths($result['message']);
}
/**
* CakeEmailTest::testWrapForJapaneseEncoding()
*
* @return void
*/
public function testWrapForJapaneseEncoding() {
$this->skipIf(!function_exists('mb_convert_encoding'));

View file

@ -355,7 +355,7 @@ class HttpResponseTest extends CakeTestCase {
*
* @dataProvider invalidParseResponseDataProvider
* @expectedException SocketException
* return void
* @return void
*/
public function testInvalidParseResponseData($value) {
$this->HttpResponse->parseResponse($value);

View file

@ -462,6 +462,8 @@ class TestCachedPagesController extends Controller {
/**
* Test cached views with themes.
*
* @return void
*/
public function themed() {
$this->cacheAction = 10;

View file

@ -2410,6 +2410,8 @@ class RouterTest extends CakeTestCase {
/**
* test using custom route class in PluginDot notation
*
* @return void
*/
public function testUsingCustomRouteClassPluginDotSyntax() {
App::build(array(
@ -2572,6 +2574,8 @@ class RouterTest extends CakeTestCase {
/**
* Test that Router::url() uses the first request
*
* @return void
*/
public function testUrlWithRequestAction() {
$firstRequest = new CakeRequest('/posts/index');

View file

@ -35,6 +35,11 @@ class CakeTestCaseTest extends CakeTestCase {
*/
public $fixtures = array('core.post', 'core.author', 'core.test_plugin_comment');
/**
* CakeTestCaseTest::setUpBeforeClass()
*
* @return void
*/
public static function setUpBeforeClass() {
require_once CAKE . 'Test' . DS . 'Fixture' . DS . 'AssertTagsTestCase.php';
require_once CAKE . 'Test' . DS . 'Fixture' . DS . 'FixturizedTestCase.php';

View file

@ -145,6 +145,8 @@ class ControllerTestCaseTest extends CakeTestCase {
/**
* Test that ControllerTestCase::generate() creates mock objects correctly
*
* @return void
*/
public function testGenerate() {
if (defined('APP_CONTROLLER_EXISTS')) {
@ -210,6 +212,8 @@ class ControllerTestCaseTest extends CakeTestCase {
/**
* testGenerateWithComponentConfig
*
* @return void
*/
public function testGenerateWithComponentConfig() {
$Tests = $this->Case->generate('TestConfigs', array(
@ -232,6 +236,8 @@ class ControllerTestCaseTest extends CakeTestCase {
/**
* Tests ControllerTestCase::generate() using classes from plugins
*
* @return void
*/
public function testGenerateWithPlugin() {
$Tests = $this->Case->generate('TestPlugin.Tests', array(
@ -266,6 +272,8 @@ class ControllerTestCaseTest extends CakeTestCase {
/**
* Tests testAction
*
* @return void
*/
public function testTestAction() {
$Controller = $this->Case->generate('TestsApps');
@ -327,6 +335,7 @@ class ControllerTestCaseTest extends CakeTestCase {
* Tests not using loaded routes during tests
*
* @expectedException MissingActionException
* @return void
*/
public function testSkipRoutes() {
Router::connect('/:controller/:action/*');
@ -338,6 +347,8 @@ class ControllerTestCaseTest extends CakeTestCase {
/**
* Tests backwards compatibility with setting the return type
*
* @return void
*/
public function testBCSetReturn() {
$this->Case->autoMock = true;
@ -367,6 +378,8 @@ class ControllerTestCaseTest extends CakeTestCase {
/**
* Tests sending POST data to testAction
*
* @return void
*/
public function testTestActionPostData() {
$this->Case->autoMock = true;
@ -409,6 +422,8 @@ class ControllerTestCaseTest extends CakeTestCase {
/**
* Tests sending GET data to testAction
*
* @return void
*/
public function testTestActionGetData() {
$this->Case->autoMock = true;
@ -465,6 +480,8 @@ class ControllerTestCaseTest extends CakeTestCase {
/**
* Tests autoMock ability
*
* @return void
*/
public function testAutoMock() {
$this->Case->autoMock = true;
@ -478,6 +495,8 @@ class ControllerTestCaseTest extends CakeTestCase {
/**
* Test using testAction and not mocking
*
* @return void
*/
public function testNoMocking() {
$result = $this->Case->testAction('/tests_apps/some_method');

View file

@ -268,6 +268,7 @@ class ClassRegistryTest extends CakeTestCase {
/**
* Tests prefixed datasource names for test purposes
*
* @return void
*/
public function testPrefixedTestDatasource() {
ClassRegistry::config(array('testing' => true));
@ -287,6 +288,7 @@ class ClassRegistryTest extends CakeTestCase {
/**
* Tests that passing the string parameter to init() will return false if the model does not exists
*
* @return void
*/
public function testInitStrict() {
$this->assertFalse(ClassRegistry::init('NonExistent', true));

View file

@ -274,6 +274,8 @@ class DebuggerTest extends CakeTestCase {
/**
* Test method for testing addFormat with callbacks.
*
* @return void
*/
public function customFormat($error, $strings) {
return $error['error'] . ': I eated an error ' . $error['file'];

View file

@ -125,6 +125,8 @@ class FileTest extends CakeTestCase {
/**
* testPermission method
*
* @return void
*/
public function testPermission() {
$this->skipIf(DIRECTORY_SEPARATOR === '\\', 'File permissions tests not supported on Windows.');
@ -532,7 +534,7 @@ class FileTest extends CakeTestCase {
$path = CAKE . 'Test' . DS . 'test_app' . DS . 'webroot' . DS . 'img' . DS . 'cake.power.gif';
$file = new File($path);
$expected = 'image/gif';
if (function_exists('mime_content_type') && false === mime_content_type($file->pwd())) {
if (function_exists('mime_content_type') && mime_content_type($file->pwd()) === false) {
$expected = false;
}
$this->assertEquals($expected, $file->mime());
@ -548,7 +550,7 @@ class FileTest extends CakeTestCase {
$tmpFile = TMP . 'tests' . DS . 'cakephp.file.test.tmp';
if (is_writable(dirname($tmpFile)) && (!file_exists($tmpFile) || is_writable($tmpFile))) {
return $tmpFile;
};
}
if ($paintSkip) {
$trace = debug_backtrace();

View file

@ -174,7 +174,7 @@ class HashTest extends CakeTestCase {
/**
* Test get()
*
* return void
* @return void
*/
public function testGet() {
$data = array('abc', 'def');
@ -920,6 +920,8 @@ class HashTest extends CakeTestCase {
/**
* Test that extract() + matching can hit null things.
*
* @return void
*/
public function testExtractMatchesNull() {
$data = array(

View file

@ -44,6 +44,8 @@ class FirstGenericObject extends GenericObject {
/**
* A generic callback
*
* @return void
*/
public function callback() {
}
@ -55,6 +57,9 @@ class FirstGenericObject extends GenericObject {
*/
class SecondGenericObject extends GenericObject {
/**
* @return void
*/
public function callback() {
}
@ -65,6 +70,9 @@ class SecondGenericObject extends GenericObject {
*/
class ThirdGenericObject extends GenericObject {
/**
* @return void
*/
public function callback() {
}

View file

@ -1352,6 +1352,8 @@ class SetTest extends CakeTestCase {
/**
* Test that extract() + matching can hit null things.
*
* @return void
*/
public function testExtractMatchesNull() {
$data = array(

View file

@ -206,7 +206,7 @@ class XmlTest extends CakeTestCase {
/**
* test build with a single empty tag
*
* return void
* @return void
*/
public function testBuildEmptyTag() {
try {
@ -553,6 +553,7 @@ XML;
* testFromArrayFail method
*
* @dataProvider invalidArrayDataProvider
* @return void
*/
public function testFromArrayFail($value) {
try {
@ -1123,6 +1124,7 @@ XML;
*
* @dataProvider invalidToArrayDataProvider
* @expectedException XmlException
* @return void
*/
public function testToArrayFail($value) {
Xml::toArray($value);

View file

@ -2288,6 +2288,7 @@ class FormHelperTest extends CakeTestCase {
/**
* test form->input() with time types.
*
* @return void
*/
public function testInputTime() {
extract($this->dateRegex);
@ -8374,6 +8375,7 @@ class FormHelperTest extends CakeTestCase {
/**
* Test base form URL when url param is passed with multiple parameters (&)
*
* @return void
*/
public function testCreateQuerystringrequest() {
$encoding = strtolower(Configure::read('App.encoding'));

View file

@ -1428,6 +1428,8 @@ class HtmlHelperTest extends CakeTestCase {
/**
* Test the array form of $startText
*
* @return void
*/
public function testGetCrumbFirstLink() {
$result = $this->Html->getCrumbList(null, 'Home');
@ -1769,6 +1771,8 @@ class HtmlHelperTest extends CakeTestCase {
/**
* Test the inline and block options for meta()
*
* @return void
*/
public function testMetaWithBlocks() {
$this->View->expects($this->at(0))
@ -2028,7 +2032,6 @@ class HtmlHelperTest extends CakeTestCase {
/**
* testCrumbList method
*
*
* @return void
*/
public function testCrumbList() {
@ -2060,6 +2063,8 @@ class HtmlHelperTest extends CakeTestCase {
/**
* Test getCrumbList startText
*
* @return void
*/
public function testCrumbListFirstLink() {
$this->Html->addCrumb('First', '#first');

View file

@ -69,6 +69,8 @@ class NumberHelperTest extends CakeTestCase {
/**
* test CakeNumber class methods are called correctly
*
* @return void
*/
public function testNumberHelperProxyMethodCalls() {
$methods = array(
@ -86,6 +88,8 @@ class NumberHelperTest extends CakeTestCase {
/**
* test engine override
*
* @return void
*/
public function testEngineOverride() {
App::build(array(

View file

@ -74,6 +74,8 @@ class TextHelperTest extends CakeTestCase {
/**
* test String class methods are called correctly
*
* @return void
*/
public function testTextHelperProxyMethodCalls() {
$methods = array(
@ -90,6 +92,8 @@ class TextHelperTest extends CakeTestCase {
/**
* test engine override
*
* @return void
*/
public function testEngineOverride() {
App::build(array(
@ -204,6 +208,8 @@ class TextHelperTest extends CakeTestCase {
/**
* Data provider for autoLinking
*
* @return array
*/
public static function autoLinkProvider() {
return array(

View file

@ -78,6 +78,8 @@ class TimeHelperTest extends CakeTestCase {
/**
* test CakeTime class methods are called correctly
*
* @return void
*/
public function testTimeHelperProxyMethodCalls() {
$methods = array(
@ -104,6 +106,8 @@ class TimeHelperTest extends CakeTestCase {
/**
* test engine override
*
* @return void
*/
public function testEngineOverride() {
App::build(array(

View file

@ -706,6 +706,8 @@ class ViewTest extends CakeTestCase {
/**
* Test that elements can have callbacks
*
* @return void
*/
public function testElementCallbacks() {
$Helper = $this->getMock('Helper', array(), array($this->View), 'ElementCallbackMockHtmlHelper');

View file

@ -27,6 +27,11 @@ class TestsAppsPostsController extends AppController {
public $viewPath = 'TestsApps';
/**
* add method
*
* @return void
*/
public function add() {
$data = array(
'Post' => array(
@ -44,6 +49,7 @@ class TestsAppsPostsController extends AppController {
/**
* check URL params
*
* @return void
*/
public function url_var() {
$this->set('params', $this->request->params);
@ -53,12 +59,18 @@ class TestsAppsPostsController extends AppController {
/**
* post var testing
*
* @return void
*/
public function post_var() {
$this->set('data', $this->request->data);
$this->render('index');
}
/**
* input_data()
*
* @return void
*/
public function input_data() {
$this->set('data', $this->request->input('json_decode', true));
$this->render('index');
@ -67,6 +79,7 @@ class TestsAppsPostsController extends AppController {
/**
* Fixturized action for testAction()
*
* @return void
*/
public function fixtured() {
$this->set('posts', $this->Post->find('all'));

View file

@ -0,0 +1,4 @@
<?php echo $this->fetch('content'); ?>
This email was sent using TestPluginTwo.

View file

@ -57,6 +57,7 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
*
* @param array $argv
* @param boolean $exit
* @return void
*/
public function run(array $argv, $exit = true) {
$this->handleArguments($argv);

View file

@ -94,6 +94,7 @@ class InterceptContentHelper extends Helper {
* Intercepts and stores the contents of the view before the layout is rendered
*
* @param string $viewFile The view file
* @return void
*/
public function afterRender($viewFile) {
$this->_View->assign('__view_no_layout__', $this->_View->fetch('content'));

View file

@ -47,8 +47,8 @@ class CakeTestModel extends Model {
* @param array $data
* @param boolean|array $validate
* @param array $fieldList
* @return void
*/
public function save($data = null, $validate = true, $fieldList = array()) {
$db = $this->getDataSource();
$db->columns['datetime']['formatter'] = 'CakeTestSuiteDispatcher::date';

View file

@ -122,6 +122,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
* Print result
*
* @param PHPUnit_Framework_TestResult $result
* @return void
*/
public function printResult(PHPUnit_Framework_TestResult $result) {
$this->paintFooter($result);
@ -131,6 +132,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
* Paint result
*
* @param PHPUnit_Framework_TestResult $result
* @return void
*/
public function paintResult(PHPUnit_Framework_TestResult $result) {
$this->paintFooter($result);
@ -142,6 +144,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
* @param PHPUnit_Framework_Test $test
* @param Exception $e
* @param float $time
* @return void
*/
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) {
$this->paintException($e, $test);
@ -153,6 +156,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
* @param PHPUnit_Framework_Test $test
* @param PHPUnit_Framework_AssertionFailedError $e
* @param float $time
* @return void
*/
public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) {
$this->paintFail($e, $test);
@ -164,6 +168,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
* @param PHPUnit_Framework_Test $test
* @param Exception $e
* @param float $time
* @return void
*/
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
$this->paintSkip($e, $test);
@ -175,6 +180,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
* @param PHPUnit_Framework_Test $test
* @param Exception $e
* @param float $time
* @return void
*/
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
$this->paintSkip($e, $test);
@ -184,6 +190,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
* A test suite started.
*
* @param PHPUnit_Framework_TestSuite $suite
* @return void
*/
public function startTestSuite(PHPUnit_Framework_TestSuite $suite) {
if (!$this->_headerSent) {
@ -196,6 +203,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
* A test suite ended.
*
* @param PHPUnit_Framework_TestSuite $suite
* @return void
*/
public function endTestSuite(PHPUnit_Framework_TestSuite $suite) {
}
@ -204,6 +212,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
* A test started.
*
* @param PHPUnit_Framework_Test $test
* @return void
*/
public function startTest(PHPUnit_Framework_Test $test) {
}
@ -213,6 +222,7 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
*
* @param PHPUnit_Framework_Test $test
* @param float $time
* @return void
*/
public function endTest(PHPUnit_Framework_Test $test, $time) {
$this->numAssertions += $test->getNumAssertions();

View file

@ -23,6 +23,7 @@ App::uses('Hash', 'Utility');
* Class used for manipulation of arrays.
*
* @package Cake.Utility
* @deprecated Will be removed in 3.0. Use Hash instead.
*/
class Set {

View file

@ -236,7 +236,7 @@ if (!function_exists('pr')) {
* print_r() will wrap <PRE> tags around the output of given array. Similar to debug().
*
* @see debug()
* @param array $var Variable to print out
* @param mixed $var Variable to print out
* @return void
* @link http://book.cakephp.org/2.0/en/core-libraries/global-constants-and-functions.html#pr
*/