mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
more missing doc block tags added
This commit is contained in:
parent
44952b06a4
commit
0d09a54033
49 changed files with 275 additions and 9 deletions
|
@ -453,6 +453,8 @@ class FileEngineTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test that clearing with repeat writes works properly
|
* Test that clearing with repeat writes works properly
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testClearingWithRepeatWrites() {
|
public function testClearingWithRepeatWrites() {
|
||||||
Cache::config('repeat', array(
|
Cache::config('repeat', array(
|
||||||
|
|
|
@ -532,6 +532,8 @@ class TestTaskTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test generateUses()
|
* Test generateUses()
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testGenerateUses() {
|
public function testGenerateUses() {
|
||||||
$result = $this->Task->generateUses('model', 'Model', 'Post');
|
$result = $this->Task->generateUses('model', 'Model', 'Post');
|
||||||
|
|
|
@ -258,6 +258,7 @@ class ConsoleOptionParserTest extends CakeTestCase {
|
||||||
* test parsing options that do not exist.
|
* test parsing options that do not exist.
|
||||||
*
|
*
|
||||||
* @expectedException ConsoleException
|
* @expectedException ConsoleException
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testOptionThatDoesNotExist() {
|
public function testOptionThatDoesNotExist() {
|
||||||
$parser = new ConsoleOptionParser('test', false);
|
$parser = new ConsoleOptionParser('test', false);
|
||||||
|
@ -270,6 +271,7 @@ class ConsoleOptionParserTest extends CakeTestCase {
|
||||||
* test parsing short options that do not exist.
|
* test parsing short options that do not exist.
|
||||||
*
|
*
|
||||||
* @expectedException ConsoleException
|
* @expectedException ConsoleException
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testShortOptionThatDoesNotExist() {
|
public function testShortOptionThatDoesNotExist() {
|
||||||
$parser = new ConsoleOptionParser('test', false);
|
$parser = new ConsoleOptionParser('test', false);
|
||||||
|
|
|
@ -840,6 +840,8 @@ TEXT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test file and console and logging
|
* Test file and console and logging
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testFileAndConsoleLogging() {
|
public function testFileAndConsoleLogging() {
|
||||||
// file logging
|
// file logging
|
||||||
|
@ -886,6 +888,8 @@ TEXT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test file and console and logging quiet output
|
* Test file and console and logging quiet output
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testQuietLog() {
|
public function testQuietLog() {
|
||||||
$output = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
$output = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
|
|
|
@ -29,6 +29,8 @@ class PhpAclTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup
|
* Setup
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
@ -44,6 +46,8 @@ class PhpAclTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test role inheritance
|
* Test role inheritance
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testRoleInheritance() {
|
public function testRoleInheritance() {
|
||||||
$roles = $this->Acl->Aro->roles('User/peter');
|
$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() {
|
public function testAddRole() {
|
||||||
$this->assertEquals(array(array(PhpAro::DEFAULT_ROLE)), $this->Acl->Aro->roles('foobar'));
|
$this->assertEquals(array(array(PhpAro::DEFAULT_ROLE)), $this->Acl->Aro->roles('foobar'));
|
||||||
|
@ -68,6 +74,8 @@ class PhpAclTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test resolving ARO
|
* Test resolving ARO
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testAroResolve() {
|
public function testAroResolve() {
|
||||||
$this->Acl->Aro->map = array(
|
$this->Acl->Aro->map = array(
|
||||||
|
@ -92,6 +100,8 @@ class PhpAclTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test correct resolution of defined aliases
|
* test correct resolution of defined aliases
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testAroAliases() {
|
public function testAroAliases() {
|
||||||
$this->Acl->Aro->map = array(
|
$this->Acl->Aro->map = array(
|
||||||
|
@ -193,6 +203,8 @@ class PhpAclTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lhs of defined rules are case insensitive
|
* lhs of defined rules are case insensitive
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testCheckIsCaseInsensitive() {
|
public function testCheckIsCaseInsensitive() {
|
||||||
$this->assertTrue($this->Acl->check('hardy', 'controllers/forms/new'));
|
$this->assertTrue($this->Acl->check('hardy', 'controllers/forms/new'));
|
||||||
|
@ -203,6 +215,8 @@ class PhpAclTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* allow should work in-memory
|
* allow should work in-memory
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testAllow() {
|
public function testAllow() {
|
||||||
$this->assertFalse($this->Acl->check('jeff', 'foo/bar'));
|
$this->assertFalse($this->Acl->check('jeff', 'foo/bar'));
|
||||||
|
@ -223,6 +237,8 @@ class PhpAclTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* deny should work in-memory
|
* deny should work in-memory
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testDeny() {
|
public function testDeny() {
|
||||||
$this->assertTrue($this->Acl->check('stan', 'controllers/baz/manager_foo'));
|
$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
|
* test that a deny rule wins over an equally specific allow rule
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testDenyRuleIsStrongerThanAllowRule() {
|
public function testDenyRuleIsStrongerThanAllowRule() {
|
||||||
$this->assertFalse($this->Acl->check('peter', 'baz/bam'));
|
$this->assertFalse($this->Acl->check('peter', 'baz/bam'));
|
||||||
|
@ -261,6 +279,8 @@ class PhpAclTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test that an invalid configuration throws exception
|
* test that an invalid configuration throws exception
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testInvalidConfigWithAroMissing() {
|
public function testInvalidConfigWithAroMissing() {
|
||||||
$this->setExpectedException(
|
$this->setExpectedException(
|
||||||
|
@ -286,6 +306,8 @@ class PhpAclTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test resolving of ACOs
|
* test resolving of ACOs
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testAcoResolve() {
|
public function testAcoResolve() {
|
||||||
$this->assertEquals(array('foo', 'bar'), $this->Acl->Aco->resolve('foo/bar'));
|
$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
|
* test that declaring cyclic dependencies should give an error when building the tree
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testAroDeclarationContainsCycles() {
|
public function testAroDeclarationContainsCycles() {
|
||||||
$config = array(
|
$config = array(
|
||||||
|
@ -328,6 +352,8 @@ class PhpAclTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test that with policy allow, only denies count
|
* test that with policy allow, only denies count
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testPolicy() {
|
public function testPolicy() {
|
||||||
// allow by default
|
// 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'));
|
||||||
$this->assertFalse($this->Acl->check('Role/sales', 'controllers/bar', 'delete'));
|
$this->assertFalse($this->Acl->check('Role/sales', 'controllers/bar', 'delete'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,7 @@ class ControllerAuthorizeTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException PHPUnit_Framework_Error
|
* @expectedException PHPUnit_Framework_Error
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testControllerTypeError() {
|
public function testControllerTypeError() {
|
||||||
$this->auth->controller(new StdClass());
|
$this->auth->controller(new StdClass());
|
||||||
|
@ -53,6 +54,7 @@ class ControllerAuthorizeTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException CakeException
|
* @expectedException CakeException
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testControllerErrorOnMissingMethod() {
|
public function testControllerErrorOnMissingMethod() {
|
||||||
$this->auth->controller(new Controller());
|
$this->auth->controller(new Controller());
|
||||||
|
@ -85,4 +87,5 @@ class ControllerAuthorizeTest extends CakeTestCase {
|
||||||
|
|
||||||
$this->assertTrue($this->auth->authorize($user, $request));
|
$this->assertTrue($this->auth->authorize($user, $request));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -594,6 +594,8 @@ class CookieComponentTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test reading empty values.
|
* Test reading empty values.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testReadEmpty() {
|
public function testReadEmpty() {
|
||||||
$_COOKIE['CakeTestCookie'] = array(
|
$_COOKIE['CakeTestCookie'] = array(
|
||||||
|
|
|
@ -863,6 +863,8 @@ HTMLBLOC;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make sure from/to are not double encoded when UTF-8 is present
|
* Make sure from/to are not double encoded when UTF-8 is present
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testEncodingFrom() {
|
public function testEncodingFrom() {
|
||||||
$this->Controller->EmailTest->to = 'Teßt <test@example.com>';
|
$this->Controller->EmailTest->to = 'Teßt <test@example.com>';
|
||||||
|
|
|
@ -677,6 +677,7 @@ class PaginatorComponentTest extends CakeTestCase {
|
||||||
* Tests for missing models
|
* Tests for missing models
|
||||||
*
|
*
|
||||||
* @expectedException MissingModelException
|
* @expectedException MissingModelException
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testPaginateMissingModel() {
|
public function testPaginateMissingModel() {
|
||||||
$Controller = new PaginatorTestController($this->request);
|
$Controller = new PaginatorTestController($this->request);
|
||||||
|
|
|
@ -172,6 +172,7 @@ class SecurityComponentTest extends CakeTestCase {
|
||||||
* visibility keyword in the blackhole callback
|
* visibility keyword in the blackhole callback
|
||||||
*
|
*
|
||||||
* @expectedException BadRequestException
|
* @expectedException BadRequestException
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testBlackholeWithBrokenCallback() {
|
public function testBlackholeWithBrokenCallback() {
|
||||||
$request = new CakeRequest('posts/index', false);
|
$request = new CakeRequest('posts/index', false);
|
||||||
|
@ -830,7 +831,7 @@ class SecurityComponentTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Test that validatePost fails when unlocked fields are changed.
|
* Test that validatePost fails when unlocked fields are changed.
|
||||||
*
|
*
|
||||||
* @return
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testValidatePostFailDisabledFieldTampering() {
|
public function testValidatePostFailDisabledFieldTampering() {
|
||||||
$this->Controller->Security->startup($this->Controller);
|
$this->Controller->Security->startup($this->Controller);
|
||||||
|
|
|
@ -64,6 +64,7 @@ class ScaffoldMockControllerWithFields extends Controller {
|
||||||
* function beforeScaffold
|
* function beforeScaffold
|
||||||
*
|
*
|
||||||
* @param string method
|
* @param string method
|
||||||
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
public function beforeScaffold($method) {
|
public function beforeScaffold($method) {
|
||||||
$this->set('scaffoldFields', array('title'));
|
$this->set('scaffoldFields', array('title'));
|
||||||
|
@ -82,7 +83,8 @@ class TestScaffoldMock extends Scaffold {
|
||||||
/**
|
/**
|
||||||
* Overload _scaffold
|
* Overload _scaffold
|
||||||
*
|
*
|
||||||
* @param unknown_type $params
|
* @param CakeRequest $request
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function _scaffold(CakeRequest $request) {
|
protected function _scaffold(CakeRequest $request) {
|
||||||
$this->_params = $request;
|
$this->_params = $request;
|
||||||
|
|
|
@ -362,6 +362,8 @@ class AppTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make sure that .svn and friends are excluded from App::objects('plugin')
|
* Make sure that .svn and friends are excluded from App::objects('plugin')
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testListObjectsIgnoreDotDirectories() {
|
public function testListObjectsIgnoreDotDirectories() {
|
||||||
$path = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS;
|
$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
|
* 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
|
* app and plugins if it does not find the class in other configured paths
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testLoadClassInLibs() {
|
public function testLoadClassInLibs() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
|
|
|
@ -436,6 +436,7 @@ class ConfigureTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException ConfigureException
|
* @expectedException ConfigureException
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testDumpNoAdapter() {
|
public function testDumpNoAdapter() {
|
||||||
Configure::dump(TMP . 'test.php', 'does_not_exist');
|
Configure::dump(TMP . 'test.php', 'does_not_exist');
|
||||||
|
|
|
@ -270,6 +270,8 @@ class ExceptionRendererTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test that helpers in custom CakeErrorController are not lost
|
* test that helpers in custom CakeErrorController are not lost
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testCakeErrorHelpersNotLost() {
|
public function testCakeErrorHelpersNotLost() {
|
||||||
$testApp = CAKE . 'Test' . DS . 'test_app' . DS;
|
$testApp = CAKE . 'Test' . DS . 'test_app' . DS;
|
||||||
|
|
|
@ -260,6 +260,7 @@ class CakeLogTest extends CakeTestCase {
|
||||||
* test enable
|
* test enable
|
||||||
*
|
*
|
||||||
* @expectedException CakeLogException
|
* @expectedException CakeLogException
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testStreamEnable() {
|
public function testStreamEnable() {
|
||||||
CakeLog::config('spam', array(
|
CakeLog::config('spam', array(
|
||||||
|
@ -275,6 +276,7 @@ class CakeLogTest extends CakeTestCase {
|
||||||
* test disable
|
* test disable
|
||||||
*
|
*
|
||||||
* @expectedException CakeLogException
|
* @expectedException CakeLogException
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testStreamDisable() {
|
public function testStreamDisable() {
|
||||||
CakeLog::config('spam', array(
|
CakeLog::config('spam', array(
|
||||||
|
@ -292,6 +294,7 @@ class CakeLogTest extends CakeTestCase {
|
||||||
* test enabled() invalid stream
|
* test enabled() invalid stream
|
||||||
*
|
*
|
||||||
* @expectedException CakeLogException
|
* @expectedException CakeLogException
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testStreamEnabledInvalid() {
|
public function testStreamEnabledInvalid() {
|
||||||
CakeLog::enabled('bogus_stream');
|
CakeLog::enabled('bogus_stream');
|
||||||
|
@ -301,11 +304,17 @@ class CakeLogTest extends CakeTestCase {
|
||||||
* test disable invalid stream
|
* test disable invalid stream
|
||||||
*
|
*
|
||||||
* @expectedException CakeLogException
|
* @expectedException CakeLogException
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testStreamDisableInvalid() {
|
public function testStreamDisableInvalid() {
|
||||||
CakeLog::disable('bogus_stream');
|
CakeLog::disable('bogus_stream');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* resets log config
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
protected function _resetLogConfig() {
|
protected function _resetLogConfig() {
|
||||||
CakeLog::config('debug', array(
|
CakeLog::config('debug', array(
|
||||||
'engine' => 'File',
|
'engine' => 'File',
|
||||||
|
@ -319,6 +328,11 @@ class CakeLogTest extends CakeTestCase {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* delete logs
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
protected function _deleteLogs() {
|
protected function _deleteLogs() {
|
||||||
if (file_exists(LOGS . 'shops.log')) {
|
if (file_exists(LOGS . 'shops.log')) {
|
||||||
unlink(LOGS . 'shops.log');
|
unlink(LOGS . 'shops.log');
|
||||||
|
@ -568,6 +582,8 @@ class CakeLogTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test convenience methods
|
* test convenience methods
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testConvenienceMethods() {
|
public function testConvenienceMethods() {
|
||||||
$this->_deleteLogs();
|
$this->_deleteLogs();
|
||||||
|
@ -642,6 +658,8 @@ class CakeLogTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test levels customization
|
* test levels customization
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testLevelCustomization() {
|
public function testLevelCustomization() {
|
||||||
$this->skipIf(DIRECTORY_SEPARATOR === '\\', 'Log level tests not supported on Windows.');
|
$this->skipIf(DIRECTORY_SEPARATOR === '\\', 'Log level tests not supported on Windows.');
|
||||||
|
@ -672,6 +690,8 @@ class CakeLogTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test writing log files with custom levels
|
* Test writing log files with custom levels
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testCustomLevelWrites() {
|
public function testCustomLevelWrites() {
|
||||||
$this->_deleteLogs();
|
$this->_deleteLogs();
|
||||||
|
|
|
@ -73,6 +73,8 @@ class ConsoleLogTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test writing to ConsoleOutput
|
* Test writing to ConsoleOutput
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testConsoleOutputWrites() {
|
public function testConsoleOutputWrites() {
|
||||||
TestCakeLog::config('test_console_log', array(
|
TestCakeLog::config('test_console_log', array(
|
||||||
|
@ -92,6 +94,8 @@ class ConsoleLogTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test logging to both ConsoleLog and FileLog
|
* Test logging to both ConsoleLog and FileLog
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testCombinedLogWriting() {
|
public function testCombinedLogWriting() {
|
||||||
TestCakeLog::config('test_console_log', array(
|
TestCakeLog::config('test_console_log', array(
|
||||||
|
@ -128,6 +132,8 @@ class ConsoleLogTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test default value of stream 'outputAs'
|
* test default value of stream 'outputAs'
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testDefaultOutputAs() {
|
public function testDefaultOutputAs() {
|
||||||
TestCakeLog::config('test_console_log', array(
|
TestCakeLog::config('test_console_log', array(
|
||||||
|
|
|
@ -122,6 +122,7 @@ class AclUser extends CakeTestModel {
|
||||||
/**
|
/**
|
||||||
* parentNode
|
* parentNode
|
||||||
*
|
*
|
||||||
|
* @return null
|
||||||
*/
|
*/
|
||||||
public function parentNode() {
|
public function parentNode() {
|
||||||
return null;
|
return null;
|
||||||
|
@ -160,6 +161,7 @@ class AclPost extends CakeTestModel {
|
||||||
/**
|
/**
|
||||||
* parentNode
|
* parentNode
|
||||||
*
|
*
|
||||||
|
* @return null
|
||||||
*/
|
*/
|
||||||
public function parentNode() {
|
public function parentNode() {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -43,6 +43,7 @@ class ContainableBehaviorTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Method executed before each test
|
* Method executed before each test
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
@ -68,6 +69,7 @@ class ContainableBehaviorTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Method executed after each test
|
* Method executed after each test
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() {
|
||||||
unset($this->Article);
|
unset($this->Article);
|
||||||
|
@ -3388,6 +3390,7 @@ class ContainableBehaviorTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* testResetAddedAssociation method
|
* testResetAddedAssociation method
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testResetAddedAssociation() {
|
public function testResetAddedAssociation() {
|
||||||
$this->assertTrue(empty($this->Article->hasMany['ArticlesTag']));
|
$this->assertTrue(empty($this->Article->hasMany['ArticlesTag']));
|
||||||
|
@ -3429,6 +3432,7 @@ class ContainableBehaviorTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* testResetAssociation method
|
* testResetAssociation method
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testResetAssociation() {
|
public function testResetAssociation() {
|
||||||
$this->Article->Behaviors->load('Containable');
|
$this->Article->Behaviors->load('Containable');
|
||||||
|
@ -3460,6 +3464,7 @@ class ContainableBehaviorTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* testResetDeeperHasOneAssociations method
|
* testResetDeeperHasOneAssociations method
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testResetDeeperHasOneAssociations() {
|
public function testResetDeeperHasOneAssociations() {
|
||||||
$this->Article->User->unbindModel(array(
|
$this->Article->User->unbindModel(array(
|
||||||
|
@ -3520,6 +3525,7 @@ class ContainableBehaviorTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* testResetMultipleHabtmAssociations method
|
* testResetMultipleHabtmAssociations method
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testResetMultipleHabtmAssociations() {
|
public function testResetMultipleHabtmAssociations() {
|
||||||
$articleHabtm = array(
|
$articleHabtm = array(
|
||||||
|
@ -3610,6 +3616,8 @@ class ContainableBehaviorTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test that bindModel and unbindModel work with find() calls in between.
|
* test that bindModel and unbindModel work with find() calls in between.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testBindMultipleTimesWithFind() {
|
public function testBindMultipleTimesWithFind() {
|
||||||
$binding = array(
|
$binding = array(
|
||||||
|
|
|
@ -416,6 +416,8 @@ class TranslateBehaviorTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test loading fields with 0 as the translated value.
|
* Test loading fields with 0 as the translated value.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testFetchTranslationsWithZero() {
|
public function testFetchTranslationsWithZero() {
|
||||||
$this->loadFixtures('Translate', 'TranslatedItem');
|
$this->loadFixtures('Translate', 'TranslatedItem');
|
||||||
|
|
|
@ -476,6 +476,7 @@ class BehaviorCollectionTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Test load() with enabled => false
|
* Test load() with enabled => false
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testLoadDisabled() {
|
public function testLoadDisabled() {
|
||||||
$Apple = new Apple();
|
$Apple = new Apple();
|
||||||
|
@ -488,6 +489,8 @@ class BehaviorCollectionTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests loading aliased behaviors
|
* Tests loading aliased behaviors
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testLoadAlias() {
|
public function testLoadAlias() {
|
||||||
$Apple = new Apple();
|
$Apple = new Apple();
|
||||||
|
@ -1189,6 +1192,8 @@ class BehaviorCollectionTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test that behavior priority
|
* Test that behavior priority
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testBehaviorOrderCallbacks() {
|
public function testBehaviorOrderCallbacks() {
|
||||||
$model = ClassRegistry::init('Orangutan');
|
$model = ClassRegistry::init('Orangutan');
|
||||||
|
|
|
@ -58,6 +58,7 @@ class MysqlTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Sets up a Dbo class instance for testing
|
* Sets up a Dbo class instance for testing
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
@ -73,6 +74,7 @@ class MysqlTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Sets up a Dbo class instance for testing
|
* Sets up a Dbo class instance for testing
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
|
@ -85,6 +87,7 @@ class MysqlTest extends CakeTestCase {
|
||||||
* Test Dbo value method
|
* Test Dbo value method
|
||||||
*
|
*
|
||||||
* @group quoting
|
* @group quoting
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testQuoting() {
|
public function testQuoting() {
|
||||||
$result = $this->Dbo->fields($this->model);
|
$result = $this->Dbo->fields($this->model);
|
||||||
|
|
|
@ -211,6 +211,7 @@ class PostgresTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Sets up a Dbo class instance for testing
|
* Sets up a Dbo class instance for testing
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
@ -224,6 +225,7 @@ class PostgresTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Sets up a Dbo class instance for testing
|
* Sets up a Dbo class instance for testing
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
|
@ -234,6 +236,7 @@ class PostgresTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Test field quoting method
|
* Test field quoting method
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testFieldQuoting() {
|
public function testFieldQuoting() {
|
||||||
$fields = array(
|
$fields = array(
|
||||||
|
|
|
@ -89,6 +89,7 @@ class SqliteTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Sets up a Dbo class instance for testing
|
* Sets up a Dbo class instance for testing
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
@ -102,6 +103,7 @@ class SqliteTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Sets up a Dbo class instance for testing
|
* Sets up a Dbo class instance for testing
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
|
@ -111,6 +113,7 @@ class SqliteTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests that SELECT queries from DboSqlite::listSources() are not cached
|
* Tests that SELECT queries from DboSqlite::listSources() are not cached
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testTableListCacheDisabling() {
|
public function testTableListCacheDisabling() {
|
||||||
$this->assertFalse(in_array('foo_test', $this->Dbo->listSources()));
|
$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
|
* Tests that cached table descriptions are saved under the sanitized key name
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testCacheKeyName() {
|
public function testCacheKeyName() {
|
||||||
Configure::write('Cache.disable', false);
|
Configure::write('Cache.disable', false);
|
||||||
|
|
|
@ -262,6 +262,7 @@ class SqlserverTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Sets up a Dbo class instance for testing
|
* Sets up a Dbo class instance for testing
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
|
@ -998,6 +998,8 @@ class DboSourceTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test getting the last error.
|
* Test getting the last error.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testLastError() {
|
public function testLastError() {
|
||||||
$stmt = $this->getMock('PDOStatement');
|
$stmt = $this->getMock('PDOStatement');
|
||||||
|
|
|
@ -29,6 +29,8 @@ class DboMock extends DboSource {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the $field without modifications
|
* Returns the $field without modifications
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function name($field) {
|
public function name($field) {
|
||||||
return $field;
|
return $field;
|
||||||
|
@ -36,6 +38,8 @@ class DboMock extends DboSource {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true to fake a database connection
|
* Returns true to fake a database connection
|
||||||
|
*
|
||||||
|
* @return boolean true
|
||||||
*/
|
*/
|
||||||
public function connect() {
|
public function connect() {
|
||||||
return true;
|
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
|
* 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,
|
* NOTE: When testing on MySQL, you must set 'persistent' => false on *both* database connections,
|
||||||
* or one connection will step on the other.
|
* or one connection will step on the other.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testCrossDatabaseJoins() {
|
public function testCrossDatabaseJoins() {
|
||||||
$config = ConnectionManager::enumConnectionObjects();
|
$config = ConnectionManager::enumConnectionObjects();
|
||||||
|
|
|
@ -7836,6 +7836,7 @@ class ModelReadTest extends BaseModelTest {
|
||||||
* Test correct fetching of virtual fields
|
* Test correct fetching of virtual fields
|
||||||
* currently is not possible to do Relation.virtualField
|
* currently is not possible to do Relation.virtualField
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testVirtualFieldsMysql() {
|
public function testVirtualFieldsMysql() {
|
||||||
$this->skipIf(!($this->db instanceof Mysql), 'The rest of virtualFields test only compatible with Mysql.');
|
$this->skipIf(!($this->db instanceof Mysql), 'The rest of virtualFields test only compatible with Mysql.');
|
||||||
|
|
|
@ -40,6 +40,7 @@ class TestAuthor extends Author {
|
||||||
* Helper method to set a datasource object
|
* Helper method to set a datasource object
|
||||||
*
|
*
|
||||||
* @param Object $object The datasource object
|
* @param Object $object The datasource object
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setDataSourceObject($object) {
|
public function setDataSourceObject($object) {
|
||||||
$this->_dataSourceObject = $object;
|
$this->_dataSourceObject = $object;
|
||||||
|
@ -77,6 +78,7 @@ class TestPost extends Post {
|
||||||
* Helper method to set a datasource object
|
* Helper method to set a datasource object
|
||||||
*
|
*
|
||||||
* @param Object $object The datasource object
|
* @param Object $object The datasource object
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setDataSourceObject($object) {
|
public function setDataSourceObject($object) {
|
||||||
$this->_dataSourceObject = $object;
|
$this->_dataSourceObject = $object;
|
||||||
|
@ -365,6 +367,8 @@ class ModelWriteTest extends BaseModelTest {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test that save() resets whitelist on failed save
|
* test that save() resets whitelist on failed save
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testSaveFieldListResetsWhitelistOnFailedSave() {
|
public function testSaveFieldListResetsWhitelistOnFailedSave() {
|
||||||
$this->loadFixtures('Bidding');
|
$this->loadFixtures('Bidding');
|
||||||
|
|
|
@ -929,6 +929,10 @@ class Post extends CakeTestModel {
|
||||||
*/
|
*/
|
||||||
public $belongsTo = array('Author');
|
public $belongsTo = array('Author');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $queryData
|
||||||
|
* @return boolean true
|
||||||
|
*/
|
||||||
public function beforeFind($queryData) {
|
public function beforeFind($queryData) {
|
||||||
if (isset($queryData['connection'])) {
|
if (isset($queryData['connection'])) {
|
||||||
$this->useDbConfig = $queryData['connection'];
|
$this->useDbConfig = $queryData['connection'];
|
||||||
|
@ -936,6 +940,11 @@ class Post extends CakeTestModel {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $results
|
||||||
|
* @param boolean $primary
|
||||||
|
* @return array $results
|
||||||
|
*/
|
||||||
public function afterFind($results, $primary = false) {
|
public function afterFind($results, $primary = false) {
|
||||||
$this->useDbConfig = 'test';
|
$this->useDbConfig = 'test';
|
||||||
return $results;
|
return $results;
|
||||||
|
@ -2729,6 +2738,11 @@ class AfterTree extends NumberTree {
|
||||||
*/
|
*/
|
||||||
public $actsAs = array('Tree');
|
public $actsAs = array('Tree');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param boolean $created
|
||||||
|
* @param array $options
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function afterSave($created, $options = array()) {
|
public function afterSave($created, $options = array()) {
|
||||||
if ($created && isset($this->data['AfterTree'])) {
|
if ($created && isset($this->data['AfterTree'])) {
|
||||||
$this->data['AfterTree']['name'] = 'Six and One Half Changed in AfterTree::afterSave() but not in database';
|
$this->data['AfterTree']['name'] = 'Six and One Half Changed in AfterTree::afterSave() but not in database';
|
||||||
|
|
|
@ -612,6 +612,8 @@ class CakeRequestTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test that files in the 0th index work.
|
* Test that files in the 0th index work.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testFilesZeroithIndex() {
|
public function testFilesZeroithIndex() {
|
||||||
$_FILES = array(
|
$_FILES = array(
|
||||||
|
@ -1296,6 +1298,7 @@ class CakeRequestTest extends CakeTestCase {
|
||||||
* - index.php/bananas/eat/tasty_banana
|
* - index.php/bananas/eat/tasty_banana
|
||||||
*
|
*
|
||||||
* @link https://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/3318
|
* @link https://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/3318
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testBaseUrlWithModRewriteAndIndexPhp() {
|
public function testBaseUrlWithModRewriteAndIndexPhp() {
|
||||||
$_SERVER['REQUEST_URI'] = '/cakephp/app/webroot/index.php';
|
$_SERVER['REQUEST_URI'] = '/cakephp/app/webroot/index.php';
|
||||||
|
|
|
@ -47,6 +47,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests the request object constructor
|
* Tests the request object constructor
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testConstruct() {
|
public function testConstruct() {
|
||||||
$response = new CakeResponse();
|
$response = new CakeResponse();
|
||||||
|
@ -71,6 +72,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests the body method
|
* Tests the body method
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testBody() {
|
public function testBody() {
|
||||||
$response = new CakeResponse();
|
$response = new CakeResponse();
|
||||||
|
@ -83,6 +85,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests the charset method
|
* Tests the charset method
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testCharset() {
|
public function testCharset() {
|
||||||
$response = new CakeResponse();
|
$response = new CakeResponse();
|
||||||
|
@ -96,6 +99,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
* Tests the statusCode method
|
* Tests the statusCode method
|
||||||
*
|
*
|
||||||
* @expectedException CakeException
|
* @expectedException CakeException
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testStatusCode() {
|
public function testStatusCode() {
|
||||||
$response = new CakeResponse();
|
$response = new CakeResponse();
|
||||||
|
@ -111,6 +115,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests the type method
|
* Tests the type method
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testType() {
|
public function testType() {
|
||||||
$response = new CakeResponse();
|
$response = new CakeResponse();
|
||||||
|
@ -133,6 +138,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests the header method
|
* Tests the header method
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testHeader() {
|
public function testHeader() {
|
||||||
$response = new CakeResponse();
|
$response = new CakeResponse();
|
||||||
|
@ -181,6 +187,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests the send method
|
* Tests the send method
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testSend() {
|
public function testSend() {
|
||||||
$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent', '_setCookies'));
|
$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent', '_setCookies'));
|
||||||
|
@ -226,7 +233,9 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests the send method and changing the content type
|
* Tests the send method and changing the content type
|
||||||
|
*
|
||||||
* @dataProvider charsetTypeProvider
|
* @dataProvider charsetTypeProvider
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testSendChangingContentType($original, $expected) {
|
public function testSendChangingContentType($original, $expected) {
|
||||||
$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent', '_setCookies'));
|
$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent', '_setCookies'));
|
||||||
|
@ -246,6 +255,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests the send method and changing the content type to JS without adding the charset
|
* Tests the send method and changing the content type to JS without adding the charset
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testSendChangingContentTypeWithoutCharset() {
|
public function testSendChangingContentTypeWithoutCharset() {
|
||||||
$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent', '_setCookies'));
|
$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent', '_setCookies'));
|
||||||
|
@ -267,6 +277,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests the send method and changing the content type
|
* Tests the send method and changing the content type
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testSendWithLocation() {
|
public function testSendWithLocation() {
|
||||||
$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent', '_setCookies'));
|
$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent', '_setCookies'));
|
||||||
|
@ -284,6 +295,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests the disableCache method
|
* Tests the disableCache method
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testDisableCache() {
|
public function testDisableCache() {
|
||||||
$response = new CakeResponse();
|
$response = new CakeResponse();
|
||||||
|
@ -299,6 +311,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests the cache method
|
* Tests the cache method
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testCache() {
|
public function testCache() {
|
||||||
$response = new CakeResponse();
|
$response = new CakeResponse();
|
||||||
|
@ -371,6 +384,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
* Tests the httpCodes method
|
* Tests the httpCodes method
|
||||||
*
|
*
|
||||||
* @expectedException CakeException
|
* @expectedException CakeException
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testHttpCodes() {
|
public function testHttpCodes() {
|
||||||
$response = new CakeResponse();
|
$response = new CakeResponse();
|
||||||
|
@ -415,6 +429,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests the download method
|
* Tests the download method
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testDownload() {
|
public function testDownload() {
|
||||||
$response = new CakeResponse();
|
$response = new CakeResponse();
|
||||||
|
@ -428,6 +443,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests the mapType method
|
* Tests the mapType method
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testMapType() {
|
public function testMapType() {
|
||||||
$response = new CakeResponse();
|
$response = new CakeResponse();
|
||||||
|
@ -444,6 +460,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests the outputCompressed method
|
* Tests the outputCompressed method
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testOutputCompressed() {
|
public function testOutputCompressed() {
|
||||||
$response = new CakeResponse();
|
$response = new CakeResponse();
|
||||||
|
@ -481,6 +498,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests the send and setting of Content-Length
|
* Tests the send and setting of Content-Length
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testSendContentLength() {
|
public function testSendContentLength() {
|
||||||
$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent'));
|
$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent'));
|
||||||
|
|
|
@ -42,6 +42,7 @@ class TestCakeEmail extends CakeEmail {
|
||||||
/**
|
/**
|
||||||
* Wrap to protected method
|
* Wrap to protected method
|
||||||
*
|
*
|
||||||
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function formatAddress($address) {
|
public function formatAddress($address) {
|
||||||
return parent::_formatAddress($address);
|
return parent::_formatAddress($address);
|
||||||
|
@ -50,6 +51,7 @@ class TestCakeEmail extends CakeEmail {
|
||||||
/**
|
/**
|
||||||
* Wrap to protected method
|
* Wrap to protected method
|
||||||
*
|
*
|
||||||
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function wrap($text, $length = CakeEmail::LINE_LENGTH_MUST) {
|
public function wrap($text, $length = CakeEmail::LINE_LENGTH_MUST) {
|
||||||
return parent::_wrap($text, $length);
|
return parent::_wrap($text, $length);
|
||||||
|
@ -67,6 +69,7 @@ class TestCakeEmail extends CakeEmail {
|
||||||
/**
|
/**
|
||||||
* Encode to protected method
|
* Encode to protected method
|
||||||
*
|
*
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function encode($text) {
|
public function encode($text) {
|
||||||
return $this->_encode($text);
|
return $this->_encode($text);
|
||||||
|
@ -75,6 +78,7 @@ class TestCakeEmail extends CakeEmail {
|
||||||
/**
|
/**
|
||||||
* Render to protected method
|
* Render to protected method
|
||||||
*
|
*
|
||||||
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function render($content) {
|
public function render($content) {
|
||||||
return $this->_render($content);
|
return $this->_render($content);
|
||||||
|
@ -82,7 +86,7 @@ class TestCakeEmail extends CakeEmail {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* EmailConfig class
|
* EmailConfig class
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -91,7 +95,7 @@ class TestEmailConfig {
|
||||||
/**
|
/**
|
||||||
* test config
|
* test config
|
||||||
*
|
*
|
||||||
* @var string
|
* @var array
|
||||||
*/
|
*/
|
||||||
public $test = array(
|
public $test = array(
|
||||||
'from' => array('some@example.com' => 'My website'),
|
'from' => array('some@example.com' => 'My website'),
|
||||||
|
@ -105,7 +109,7 @@ class TestEmailConfig {
|
||||||
/**
|
/**
|
||||||
* test config 2
|
* test config 2
|
||||||
*
|
*
|
||||||
* @var string
|
* @var array
|
||||||
*/
|
*/
|
||||||
public $test2 = array(
|
public $test2 = array(
|
||||||
'from' => array('some@example.com' => 'My website'),
|
'from' => array('some@example.com' => 'My website'),
|
||||||
|
@ -118,7 +122,7 @@ class TestEmailConfig {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* ExtendTransport class
|
* ExtendTransport class
|
||||||
* test class to ensure the class has send() method
|
* test class to ensure the class has send() method
|
||||||
*
|
*
|
||||||
|
@ -336,6 +340,8 @@ class CakeEmailTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests that it is possible set custom email validation
|
* Tests that it is possible set custom email validation
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testCustomEmailValidation() {
|
public function testCustomEmailValidation() {
|
||||||
$regex = '/^[\.a-z0-9!#$%&\'*+\/=?^_`{|}~-]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]{2,6}$/i';
|
$regex = '/^[\.a-z0-9!#$%&\'*+\/=?^_`{|}~-]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]{2,6}$/i';
|
||||||
|
@ -2051,6 +2057,8 @@ class CakeEmailTest extends CakeTestCase {
|
||||||
* Tests for compatible check.
|
* Tests for compatible check.
|
||||||
* charset property and charset() method.
|
* charset property and charset() method.
|
||||||
* headerCharset property and headerCharset() method.
|
* headerCharset property and headerCharset() method.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testCharsetsCompatible() {
|
public function testCharsetsCompatible() {
|
||||||
$this->skipIf(!function_exists('mb_convert_encoding'));
|
$this->skipIf(!function_exists('mb_convert_encoding'));
|
||||||
|
@ -2102,6 +2110,11 @@ class CakeEmailTest extends CakeTestCase {
|
||||||
$this->assertSame($oldStyleHeaders['Subject'], $newStyleHeaders['Subject']);
|
$this->assertSame($oldStyleHeaders['Subject'], $newStyleHeaders['Subject']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $charset
|
||||||
|
* @param mixed $headerCharset
|
||||||
|
* @return CakeEmail
|
||||||
|
*/
|
||||||
protected function _getEmailByOldStyleCharset($charset, $headerCharset) {
|
protected function _getEmailByOldStyleCharset($charset, $headerCharset) {
|
||||||
$email = new CakeEmail(array('transport' => 'Debug'));
|
$email = new CakeEmail(array('transport' => 'Debug'));
|
||||||
|
|
||||||
|
@ -2121,6 +2134,11 @@ class CakeEmailTest extends CakeTestCase {
|
||||||
return $email;
|
return $email;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $charset
|
||||||
|
* @param mixed $headerCharset
|
||||||
|
* @return CakeEmail
|
||||||
|
*/
|
||||||
protected function _getEmailByNewStyleCharset($charset, $headerCharset) {
|
protected function _getEmailByNewStyleCharset($charset, $headerCharset) {
|
||||||
$email = new CakeEmail(array('transport' => 'Debug'));
|
$email = new CakeEmail(array('transport' => 'Debug'));
|
||||||
|
|
||||||
|
@ -2140,6 +2158,11 @@ class CakeEmailTest extends CakeTestCase {
|
||||||
return $email;
|
return $email;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* testWrapLongLine()
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function testWrapLongLine() {
|
public function testWrapLongLine() {
|
||||||
$message = '<a href="http://cakephp.org">' . str_repeat('x', CakeEmail::LINE_LENGTH_MUST) . "</a>";
|
$message = '<a href="http://cakephp.org">' . str_repeat('x', CakeEmail::LINE_LENGTH_MUST) . "</a>";
|
||||||
|
|
||||||
|
@ -2180,6 +2203,11 @@ class CakeEmailTest extends CakeTestCase {
|
||||||
$this->assertLineLengths($result['message']);
|
$this->assertLineLengths($result['message']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* testWrapWithTagsAcrossLines()
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function testWrapWithTagsAcrossLines() {
|
public function testWrapWithTagsAcrossLines() {
|
||||||
$str = <<<HTML
|
$str = <<<HTML
|
||||||
<table>
|
<table>
|
||||||
|
@ -2204,6 +2232,11 @@ HTML;
|
||||||
$this->assertLineLengths($result['message']);
|
$this->assertLineLengths($result['message']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CakeEmailTest::testWrapIncludeLessThanSign()
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function testWrapIncludeLessThanSign() {
|
public function testWrapIncludeLessThanSign() {
|
||||||
$str = 'foo<bar';
|
$str = 'foo<bar';
|
||||||
$length = strlen($str);
|
$length = strlen($str);
|
||||||
|
@ -2222,6 +2255,11 @@ HTML;
|
||||||
$this->assertLineLengths($result['message']);
|
$this->assertLineLengths($result['message']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CakeEmailTest::testWrapForJapaneseEncoding()
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function testWrapForJapaneseEncoding() {
|
public function testWrapForJapaneseEncoding() {
|
||||||
$this->skipIf(!function_exists('mb_convert_encoding'));
|
$this->skipIf(!function_exists('mb_convert_encoding'));
|
||||||
|
|
||||||
|
|
|
@ -462,6 +462,8 @@ class TestCachedPagesController extends Controller {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test cached views with themes.
|
* Test cached views with themes.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function themed() {
|
public function themed() {
|
||||||
$this->cacheAction = 10;
|
$this->cacheAction = 10;
|
||||||
|
|
|
@ -2388,6 +2388,8 @@ class RouterTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test using custom route class in PluginDot notation
|
* test using custom route class in PluginDot notation
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testUsingCustomRouteClassPluginDotSyntax() {
|
public function testUsingCustomRouteClassPluginDotSyntax() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
|
@ -2550,6 +2552,8 @@ class RouterTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test that Router::url() uses the first request
|
* Test that Router::url() uses the first request
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testUrlWithRequestAction() {
|
public function testUrlWithRequestAction() {
|
||||||
$firstRequest = new CakeRequest('/posts/index');
|
$firstRequest = new CakeRequest('/posts/index');
|
||||||
|
|
|
@ -35,6 +35,11 @@ class CakeTestCaseTest extends CakeTestCase {
|
||||||
*/
|
*/
|
||||||
public $fixtures = array('core.post', 'core.author', 'core.test_plugin_comment');
|
public $fixtures = array('core.post', 'core.author', 'core.test_plugin_comment');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CakeTestCaseTest::setUpBeforeClass()
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public static function setUpBeforeClass() {
|
public static function setUpBeforeClass() {
|
||||||
require_once CAKE . 'Test' . DS . 'Fixture' . DS . 'AssertTagsTestCase.php';
|
require_once CAKE . 'Test' . DS . 'Fixture' . DS . 'AssertTagsTestCase.php';
|
||||||
require_once CAKE . 'Test' . DS . 'Fixture' . DS . 'FixturizedTestCase.php';
|
require_once CAKE . 'Test' . DS . 'Fixture' . DS . 'FixturizedTestCase.php';
|
||||||
|
|
|
@ -145,6 +145,8 @@ class ControllerTestCaseTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test that ControllerTestCase::generate() creates mock objects correctly
|
* Test that ControllerTestCase::generate() creates mock objects correctly
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testGenerate() {
|
public function testGenerate() {
|
||||||
if (defined('APP_CONTROLLER_EXISTS')) {
|
if (defined('APP_CONTROLLER_EXISTS')) {
|
||||||
|
@ -210,6 +212,8 @@ class ControllerTestCaseTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testGenerateWithComponentConfig
|
* testGenerateWithComponentConfig
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testGenerateWithComponentConfig() {
|
public function testGenerateWithComponentConfig() {
|
||||||
$Tests = $this->Case->generate('TestConfigs', array(
|
$Tests = $this->Case->generate('TestConfigs', array(
|
||||||
|
@ -232,6 +236,8 @@ class ControllerTestCaseTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests ControllerTestCase::generate() using classes from plugins
|
* Tests ControllerTestCase::generate() using classes from plugins
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testGenerateWithPlugin() {
|
public function testGenerateWithPlugin() {
|
||||||
$Tests = $this->Case->generate('TestPlugin.Tests', array(
|
$Tests = $this->Case->generate('TestPlugin.Tests', array(
|
||||||
|
@ -266,6 +272,8 @@ class ControllerTestCaseTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests testAction
|
* Tests testAction
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testTestAction() {
|
public function testTestAction() {
|
||||||
$Controller = $this->Case->generate('TestsApps');
|
$Controller = $this->Case->generate('TestsApps');
|
||||||
|
@ -327,6 +335,7 @@ class ControllerTestCaseTest extends CakeTestCase {
|
||||||
* Tests not using loaded routes during tests
|
* Tests not using loaded routes during tests
|
||||||
*
|
*
|
||||||
* @expectedException MissingActionException
|
* @expectedException MissingActionException
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testSkipRoutes() {
|
public function testSkipRoutes() {
|
||||||
Router::connect('/:controller/:action/*');
|
Router::connect('/:controller/:action/*');
|
||||||
|
@ -338,6 +347,8 @@ class ControllerTestCaseTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests backwards compatibility with setting the return type
|
* Tests backwards compatibility with setting the return type
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testBCSetReturn() {
|
public function testBCSetReturn() {
|
||||||
$this->Case->autoMock = true;
|
$this->Case->autoMock = true;
|
||||||
|
@ -367,6 +378,8 @@ class ControllerTestCaseTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests sending POST data to testAction
|
* Tests sending POST data to testAction
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testTestActionPostData() {
|
public function testTestActionPostData() {
|
||||||
$this->Case->autoMock = true;
|
$this->Case->autoMock = true;
|
||||||
|
@ -409,6 +422,8 @@ class ControllerTestCaseTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests sending GET data to testAction
|
* Tests sending GET data to testAction
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testTestActionGetData() {
|
public function testTestActionGetData() {
|
||||||
$this->Case->autoMock = true;
|
$this->Case->autoMock = true;
|
||||||
|
@ -465,6 +480,8 @@ class ControllerTestCaseTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests autoMock ability
|
* Tests autoMock ability
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testAutoMock() {
|
public function testAutoMock() {
|
||||||
$this->Case->autoMock = true;
|
$this->Case->autoMock = true;
|
||||||
|
@ -478,6 +495,8 @@ class ControllerTestCaseTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test using testAction and not mocking
|
* Test using testAction and not mocking
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testNoMocking() {
|
public function testNoMocking() {
|
||||||
$result = $this->Case->testAction('/tests_apps/some_method');
|
$result = $this->Case->testAction('/tests_apps/some_method');
|
||||||
|
|
|
@ -268,6 +268,7 @@ class ClassRegistryTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests prefixed datasource names for test purposes
|
* Tests prefixed datasource names for test purposes
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testPrefixedTestDatasource() {
|
public function testPrefixedTestDatasource() {
|
||||||
ClassRegistry::config(array('testing' => true));
|
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
|
* Tests that passing the string parameter to init() will return false if the model does not exists
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testInitStrict() {
|
public function testInitStrict() {
|
||||||
$this->assertFalse(ClassRegistry::init('NonExistent', true));
|
$this->assertFalse(ClassRegistry::init('NonExistent', true));
|
||||||
|
|
|
@ -274,6 +274,8 @@ class DebuggerTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test method for testing addFormat with callbacks.
|
* Test method for testing addFormat with callbacks.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function customFormat($error, $strings) {
|
public function customFormat($error, $strings) {
|
||||||
return $error['error'] . ': I eated an error ' . $error['file'];
|
return $error['error'] . ': I eated an error ' . $error['file'];
|
||||||
|
|
|
@ -125,6 +125,8 @@ class FileTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testPermission method
|
* testPermission method
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testPermission() {
|
public function testPermission() {
|
||||||
$this->skipIf(DIRECTORY_SEPARATOR === '\\', 'File permissions tests not supported on Windows.');
|
$this->skipIf(DIRECTORY_SEPARATOR === '\\', 'File permissions tests not supported on Windows.');
|
||||||
|
@ -548,7 +550,7 @@ class FileTest extends CakeTestCase {
|
||||||
$tmpFile = TMP . 'tests' . DS . 'cakephp.file.test.tmp';
|
$tmpFile = TMP . 'tests' . DS . 'cakephp.file.test.tmp';
|
||||||
if (is_writable(dirname($tmpFile)) && (!file_exists($tmpFile) || is_writable($tmpFile))) {
|
if (is_writable(dirname($tmpFile)) && (!file_exists($tmpFile) || is_writable($tmpFile))) {
|
||||||
return $tmpFile;
|
return $tmpFile;
|
||||||
};
|
}
|
||||||
|
|
||||||
if ($paintSkip) {
|
if ($paintSkip) {
|
||||||
$trace = debug_backtrace();
|
$trace = debug_backtrace();
|
||||||
|
@ -560,4 +562,5 @@ class FileTest extends CakeTestCase {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -916,6 +916,8 @@ class HashTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test that extract() + matching can hit null things.
|
* Test that extract() + matching can hit null things.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testExtractMatchesNull() {
|
public function testExtractMatchesNull() {
|
||||||
$data = array(
|
$data = array(
|
||||||
|
|
|
@ -44,6 +44,8 @@ class FirstGenericObject extends GenericObject {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A generic callback
|
* A generic callback
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function callback() {
|
public function callback() {
|
||||||
}
|
}
|
||||||
|
@ -55,6 +57,9 @@ class FirstGenericObject extends GenericObject {
|
||||||
*/
|
*/
|
||||||
class SecondGenericObject extends GenericObject {
|
class SecondGenericObject extends GenericObject {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function callback() {
|
public function callback() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,6 +70,9 @@ class SecondGenericObject extends GenericObject {
|
||||||
*/
|
*/
|
||||||
class ThirdGenericObject extends GenericObject {
|
class ThirdGenericObject extends GenericObject {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function callback() {
|
public function callback() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1352,6 +1352,8 @@ class SetTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test that extract() + matching can hit null things.
|
* Test that extract() + matching can hit null things.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testExtractMatchesNull() {
|
public function testExtractMatchesNull() {
|
||||||
$data = array(
|
$data = array(
|
||||||
|
|
|
@ -553,6 +553,7 @@ XML;
|
||||||
* testFromArrayFail method
|
* testFromArrayFail method
|
||||||
*
|
*
|
||||||
* @dataProvider invalidArrayDataProvider
|
* @dataProvider invalidArrayDataProvider
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testFromArrayFail($value) {
|
public function testFromArrayFail($value) {
|
||||||
try {
|
try {
|
||||||
|
@ -1123,6 +1124,7 @@ XML;
|
||||||
*
|
*
|
||||||
* @dataProvider invalidToArrayDataProvider
|
* @dataProvider invalidToArrayDataProvider
|
||||||
* @expectedException XmlException
|
* @expectedException XmlException
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testToArrayFail($value) {
|
public function testToArrayFail($value) {
|
||||||
Xml::toArray($value);
|
Xml::toArray($value);
|
||||||
|
|
|
@ -2236,6 +2236,7 @@ class FormHelperTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* test form->input() with time types.
|
* test form->input() with time types.
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testInputTime() {
|
public function testInputTime() {
|
||||||
extract($this->dateRegex);
|
extract($this->dateRegex);
|
||||||
|
@ -8254,6 +8255,7 @@ class FormHelperTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* Test base form URL when url param is passed with multiple parameters (&)
|
* Test base form URL when url param is passed with multiple parameters (&)
|
||||||
*
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testCreateQuerystringrequest() {
|
public function testCreateQuerystringrequest() {
|
||||||
$encoding = strtolower(Configure::read('App.encoding'));
|
$encoding = strtolower(Configure::read('App.encoding'));
|
||||||
|
|
|
@ -1428,6 +1428,8 @@ class HtmlHelperTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the array form of $startText
|
* Test the array form of $startText
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testGetCrumbFirstLink() {
|
public function testGetCrumbFirstLink() {
|
||||||
$result = $this->Html->getCrumbList(null, 'Home');
|
$result = $this->Html->getCrumbList(null, 'Home');
|
||||||
|
@ -1769,6 +1771,8 @@ class HtmlHelperTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the inline and block options for meta()
|
* Test the inline and block options for meta()
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testMetaWithBlocks() {
|
public function testMetaWithBlocks() {
|
||||||
$this->View->expects($this->at(0))
|
$this->View->expects($this->at(0))
|
||||||
|
@ -2028,7 +2032,6 @@ class HtmlHelperTest extends CakeTestCase {
|
||||||
/**
|
/**
|
||||||
* testCrumbList method
|
* testCrumbList method
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testCrumbList() {
|
public function testCrumbList() {
|
||||||
|
@ -2060,6 +2063,8 @@ class HtmlHelperTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test getCrumbList startText
|
* Test getCrumbList startText
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testCrumbListFirstLink() {
|
public function testCrumbListFirstLink() {
|
||||||
$this->Html->addCrumb('First', '#first');
|
$this->Html->addCrumb('First', '#first');
|
||||||
|
|
|
@ -69,6 +69,8 @@ class NumberHelperTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test CakeNumber class methods are called correctly
|
* test CakeNumber class methods are called correctly
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testNumberHelperProxyMethodCalls() {
|
public function testNumberHelperProxyMethodCalls() {
|
||||||
$methods = array(
|
$methods = array(
|
||||||
|
@ -86,6 +88,8 @@ class NumberHelperTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test engine override
|
* test engine override
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testEngineOverride() {
|
public function testEngineOverride() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
|
|
|
@ -74,6 +74,8 @@ class TextHelperTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test String class methods are called correctly
|
* test String class methods are called correctly
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testTextHelperProxyMethodCalls() {
|
public function testTextHelperProxyMethodCalls() {
|
||||||
$methods = array(
|
$methods = array(
|
||||||
|
@ -90,6 +92,8 @@ class TextHelperTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test engine override
|
* test engine override
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testEngineOverride() {
|
public function testEngineOverride() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
|
|
|
@ -78,6 +78,8 @@ class TimeHelperTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test CakeTime class methods are called correctly
|
* test CakeTime class methods are called correctly
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testTimeHelperProxyMethodCalls() {
|
public function testTimeHelperProxyMethodCalls() {
|
||||||
$methods = array(
|
$methods = array(
|
||||||
|
@ -104,6 +106,8 @@ class TimeHelperTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test engine override
|
* test engine override
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testEngineOverride() {
|
public function testEngineOverride() {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
|
|
|
@ -706,6 +706,8 @@ class ViewTest extends CakeTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test that elements can have callbacks
|
* Test that elements can have callbacks
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testElementCallbacks() {
|
public function testElementCallbacks() {
|
||||||
$Helper = $this->getMock('Helper', array(), array($this->View), 'ElementCallbackMockHtmlHelper');
|
$Helper = $this->getMock('Helper', array(), array($this->View), 'ElementCallbackMockHtmlHelper');
|
||||||
|
|
Loading…
Reference in a new issue