mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
test: Add return type declarations to overridden methods of TestCase classes.
This commit is contained in:
parent
0692ce5b62
commit
75716f76bc
146 changed files with 273 additions and 273 deletions
|
@ -34,7 +34,7 @@ class BasicsTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'Locale' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS)
|
'Locale' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS)
|
||||||
|
|
|
@ -32,7 +32,7 @@ class CacheTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->_cacheDisable = Configure::read('Cache.disable');
|
$this->_cacheDisable = Configure::read('Cache.disable');
|
||||||
Configure::write('Cache.disable', false);
|
Configure::write('Cache.disable', false);
|
||||||
|
@ -46,7 +46,7 @@ class CacheTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
Cache::drop('latest');
|
Cache::drop('latest');
|
||||||
Cache::drop('page');
|
Cache::drop('page');
|
||||||
|
|
|
@ -37,7 +37,7 @@ class ApcEngineTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$hasApc = extension_loaded('apc') || extension_loaded('apcu');
|
$hasApc = extension_loaded('apc') || extension_loaded('apcu');
|
||||||
$this->skipIf(!$hasApc, 'Apc is not installed or configured properly.');
|
$this->skipIf(!$hasApc, 'Apc is not installed or configured properly.');
|
||||||
|
@ -60,7 +60,7 @@ class ApcEngineTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
Configure::write('Cache.disable', $this->_cacheDisable);
|
Configure::write('Cache.disable', $this->_cacheDisable);
|
||||||
Cache::drop('apc');
|
Cache::drop('apc');
|
||||||
|
|
|
@ -37,7 +37,7 @@ class FileEngineTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Cache.disable', false);
|
Configure::write('Cache.disable', false);
|
||||||
Cache::config('file_test', array('engine' => 'File', 'path' => CACHE));
|
Cache::config('file_test', array('engine' => 'File', 'path' => CACHE));
|
||||||
|
@ -48,7 +48,7 @@ class FileEngineTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
// Cache::clear(false, 'file_test');
|
// Cache::clear(false, 'file_test');
|
||||||
Cache::drop('file_test');
|
Cache::drop('file_test');
|
||||||
|
|
|
@ -54,7 +54,7 @@ class MemcacheEngineTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->skipIf(!class_exists('Memcache'), 'Memcache is not installed or configured properly.');
|
$this->skipIf(!class_exists('Memcache'), 'Memcache is not installed or configured properly.');
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ class MemcacheEngineTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
Configure::write('Cache.disable', $this->_cacheDisable);
|
Configure::write('Cache.disable', $this->_cacheDisable);
|
||||||
Cache::drop('memcache');
|
Cache::drop('memcache');
|
||||||
|
|
|
@ -60,7 +60,7 @@ class MemcachedEngineTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->skipIf(!class_exists('Memcached'), 'Memcached is not installed or configured properly.');
|
$this->skipIf(!class_exists('Memcached'), 'Memcached is not installed or configured properly.');
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ class MemcachedEngineTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
Cache::drop('memcached');
|
Cache::drop('memcached');
|
||||||
Cache::drop('memcached_groups');
|
Cache::drop('memcached_groups');
|
||||||
|
|
|
@ -31,7 +31,7 @@ class RedisEngineTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->skipIf(!class_exists('Redis'), 'Redis is not installed or configured properly.');
|
$this->skipIf(!class_exists('Redis'), 'Redis is not installed or configured properly.');
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ class RedisEngineTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
Configure::write('Cache.disable', $this->_cacheDisable);
|
Configure::write('Cache.disable', $this->_cacheDisable);
|
||||||
Cache::drop('');
|
Cache::drop('');
|
||||||
|
|
|
@ -30,7 +30,7 @@ class WincacheEngineTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->skipIf(!function_exists('wincache_ucache_set'), 'Wincache is not installed or configured properly.');
|
$this->skipIf(!function_exists('wincache_ucache_set'), 'Wincache is not installed or configured properly.');
|
||||||
$this->_cacheDisable = Configure::read('Cache.disable');
|
$this->_cacheDisable = Configure::read('Cache.disable');
|
||||||
|
@ -43,7 +43,7 @@ class WincacheEngineTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
Configure::write('Cache.disable', $this->_cacheDisable);
|
Configure::write('Cache.disable', $this->_cacheDisable);
|
||||||
Cache::drop('wincache');
|
Cache::drop('wincache');
|
||||||
|
|
|
@ -30,7 +30,7 @@ class XcacheEngineTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
if (!function_exists('xcache_set')) {
|
if (!function_exists('xcache_set')) {
|
||||||
$this->markTestSkipped('Xcache is not installed or configured properly');
|
$this->markTestSkipped('Xcache is not installed or configured properly');
|
||||||
|
@ -45,7 +45,7 @@ class XcacheEngineTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
Configure::write('Cache.disable', $this->_cacheDisable);
|
Configure::write('Cache.disable', $this->_cacheDisable);
|
||||||
Cache::drop('xcache');
|
Cache::drop('xcache');
|
||||||
|
|
|
@ -50,7 +50,7 @@ class IniReaderTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS;
|
$this->path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ class PhpReaderTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS;
|
$this->path = CAKE . 'Test' . DS . 'test_app' . DS . 'Config' . DS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ class AclShellTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Acl.database', 'test');
|
Configure::write('Acl.database', 'test');
|
||||||
Configure::write('Acl.classname', 'DbAcl');
|
Configure::write('Acl.classname', 'DbAcl');
|
||||||
|
|
|
@ -34,7 +34,7 @@ class ApiShellTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
||||||
|
|
|
@ -45,7 +45,7 @@ class BakeShellTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
||||||
|
@ -62,7 +62,7 @@ class BakeShellTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Dispatch, $this->Shell);
|
unset($this->Dispatch, $this->Shell);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ class CommandListShellTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'Plugin' => array(
|
'Plugin' => array(
|
||||||
|
@ -82,7 +82,7 @@ class CommandListShellTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Shell);
|
unset($this->Shell);
|
||||||
CakePlugin::unload();
|
CakePlugin::unload();
|
||||||
|
|
|
@ -51,7 +51,7 @@ class CompletionShellTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'Plugin' => array(
|
'Plugin' => array(
|
||||||
|
@ -84,7 +84,7 @@ class CompletionShellTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Shell);
|
unset($this->Shell);
|
||||||
CakePlugin::unload();
|
CakePlugin::unload();
|
||||||
|
|
|
@ -102,7 +102,7 @@ class SchemaShellTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
|
@ -119,7 +119,7 @@ class SchemaShellTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
if (!empty($this->file) && $this->file instanceof File) {
|
if (!empty($this->file) && $this->file instanceof File) {
|
||||||
$this->file->delete();
|
$this->file->delete();
|
||||||
|
|
|
@ -28,7 +28,7 @@ class CommandTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'Plugin' => array(
|
'Plugin' => array(
|
||||||
|
@ -55,7 +55,7 @@ class CommandTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->CommandTask);
|
unset($this->CommandTask);
|
||||||
CakePlugin::unload();
|
CakePlugin::unload();
|
||||||
|
|
|
@ -69,7 +69,7 @@ class ControllerTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
||||||
|
@ -101,7 +101,7 @@ class ControllerTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
unset($this->Task);
|
unset($this->Task);
|
||||||
ClassRegistry::flush();
|
ClassRegistry::flush();
|
||||||
App::build();
|
App::build();
|
||||||
|
|
|
@ -34,7 +34,7 @@ class DbConfigTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
||||||
|
@ -52,7 +52,7 @@ class DbConfigTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Task);
|
unset($this->Task);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ class ExtractTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
||||||
|
@ -56,7 +56,7 @@ class ExtractTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Task);
|
unset($this->Task);
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ class FixtureTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
||||||
|
@ -74,7 +74,7 @@ class FixtureTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Task);
|
unset($this->Task);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ class ModelTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
||||||
|
@ -99,7 +99,7 @@ class ModelTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Task);
|
unset($this->Task);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ class PluginTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
$this->out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
$this->in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
$this->in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
||||||
|
@ -67,7 +67,7 @@ class PluginTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
if (file_exists($this->Task->bootstrap)) {
|
if (file_exists($this->Task->bootstrap)) {
|
||||||
unlink($this->Task->bootstrap);
|
unlink($this->Task->bootstrap);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ class ProjectTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
||||||
|
@ -55,7 +55,7 @@ class ProjectTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
|
|
||||||
$Folder = new Folder($this->Task->path . 'bake_test_app');
|
$Folder = new Folder($this->Task->path . 'bake_test_app');
|
||||||
|
|
|
@ -36,7 +36,7 @@ class TemplateTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
||||||
|
@ -52,7 +52,7 @@ class TemplateTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Task);
|
unset($this->Task);
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,7 +191,7 @@ class TestTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
||||||
|
@ -209,7 +209,7 @@ class TestTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Task);
|
unset($this->Task);
|
||||||
CakePlugin::unload();
|
CakePlugin::unload();
|
||||||
|
|
|
@ -184,7 +184,7 @@ class ViewTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
||||||
|
@ -208,7 +208,7 @@ class ViewTaskTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Task, $this->Dispatch);
|
unset($this->Task, $this->Dispatch);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ class TestShellTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
|
||||||
|
@ -66,7 +66,7 @@ class TestShellTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Dispatch, $this->Shell);
|
unset($this->Dispatch, $this->Shell);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ class ConsoleErrorHandlerTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return Mock object
|
* @return Mock object
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->Error = $this->getMock('ConsoleErrorHandler', array('_stop'));
|
$this->Error = $this->getMock('ConsoleErrorHandler', array('_stop'));
|
||||||
ConsoleErrorHandler::$stderr = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
ConsoleErrorHandler::$stderr = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
|
@ -41,7 +41,7 @@ class ConsoleErrorHandlerTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
unset($this->Error);
|
unset($this->Error);
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ class ConsoleOutputTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->output = $this->getMock('ConsoleOutput', array('_write'));
|
$this->output = $this->getMock('ConsoleOutput', array('_write'));
|
||||||
$this->output->outputAs(ConsoleOutput::COLOR);
|
$this->output->outputAs(ConsoleOutput::COLOR);
|
||||||
|
@ -41,7 +41,7 @@ class ConsoleOutputTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->output);
|
unset($this->output);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ class ProgressShellHelperTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->consoleOutput = new ConsoleOutputStub();
|
$this->consoleOutput = new ConsoleOutputStub();
|
||||||
|
|
|
@ -27,7 +27,7 @@ class TableShellHelperTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->consoleOutput = new ConsoleOutputStub();
|
$this->consoleOutput = new ConsoleOutputStub();
|
||||||
|
|
|
@ -109,7 +109,7 @@ class ShellDispatcherTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'Plugin' => array(
|
'Plugin' => array(
|
||||||
|
@ -127,7 +127,7 @@ class ShellDispatcherTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
CakePlugin::unload();
|
CakePlugin::unload();
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,7 @@ class ShellTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$output = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
$output = $this->getMock('ConsoleOutput', array(), array(), '', false);
|
||||||
|
|
|
@ -37,7 +37,7 @@ class TaskCollectionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$shell = $this->getMock('Shell', array(), array(), '', false);
|
$shell = $this->getMock('Shell', array(), array(), '', false);
|
||||||
$dispatcher = $this->getMock('ShellDispatcher', array(), array(), '', false);
|
$dispatcher = $this->getMock('ShellDispatcher', array(), array(), '', false);
|
||||||
|
@ -49,7 +49,7 @@ class TaskCollectionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
unset($this->Tasks);
|
unset($this->Tasks);
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ class ApplicationControllerTest extends ControllerTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
CakeSession::destroy();
|
CakeSession::destroy();
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ class ApplicationControllerTest extends ControllerTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
CakeSession::destroy();
|
CakeSession::destroy();
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,7 +188,7 @@ class DbAclTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Acl.classname', 'DbAclTwoTest');
|
Configure::write('Acl.classname', 'DbAclTwoTest');
|
||||||
Configure::write('Acl.database', 'test');
|
Configure::write('Acl.database', 'test');
|
||||||
|
@ -201,7 +201,7 @@ class DbAclTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Acl);
|
unset($this->Acl);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ class PhpAclTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Acl.classname', 'PhpAcl');
|
Configure::write('Acl.classname', 'PhpAcl');
|
||||||
$Collection = new ComponentCollection();
|
$Collection = new ComponentCollection();
|
||||||
|
|
|
@ -31,7 +31,7 @@ class AclComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
if (!class_exists('MockAclImplementation', false)) {
|
if (!class_exists('MockAclImplementation', false)) {
|
||||||
$this->getMock('AclInterface', array(), array(), 'MockAclImplementation');
|
$this->getMock('AclInterface', array(), array(), 'MockAclImplementation');
|
||||||
|
@ -46,7 +46,7 @@ class AclComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Acl);
|
unset($this->Acl);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ class ActionsAuthorizeTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->controller = $this->getMock('Controller', array(), array(), '', false);
|
$this->controller = $this->getMock('Controller', array(), array(), '', false);
|
||||||
$this->Acl = $this->getMock('AclComponent', array(), array(), '', false);
|
$this->Acl = $this->getMock('AclComponent', array(), array(), '', false);
|
||||||
|
|
|
@ -41,7 +41,7 @@ class BasicAuthenticateTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->Collection = $this->getMock('ComponentCollection');
|
$this->Collection = $this->getMock('ComponentCollection');
|
||||||
$this->auth = new BasicAuthenticate($this->Collection, array(
|
$this->auth = new BasicAuthenticate($this->Collection, array(
|
||||||
|
|
|
@ -39,7 +39,7 @@ class BlowfishAuthenticateTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->Collection = $this->getMock('ComponentCollection');
|
$this->Collection = $this->getMock('ComponentCollection');
|
||||||
$this->auth = new BlowfishAuthenticate($this->Collection, array(
|
$this->auth = new BlowfishAuthenticate($this->Collection, array(
|
||||||
|
|
|
@ -33,7 +33,7 @@ class ControllerAuthorizeTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->controller = $this->getMock('Controller', array('isAuthorized'), array(), '', false);
|
$this->controller = $this->getMock('Controller', array('isAuthorized'), array(), '', false);
|
||||||
$this->components = $this->getMock('ComponentCollection');
|
$this->components = $this->getMock('ComponentCollection');
|
||||||
|
|
|
@ -34,7 +34,7 @@ class CrudAuthorizeTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Routing.prefixes', array());
|
Configure::write('Routing.prefixes', array());
|
||||||
Router::reload();
|
Router::reload();
|
||||||
|
|
|
@ -42,7 +42,7 @@ class DigestAuthenticateTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->Collection = $this->getMock('ComponentCollection');
|
$this->Collection = $this->getMock('ComponentCollection');
|
||||||
$this->server = $_SERVER;
|
$this->server = $_SERVER;
|
||||||
|
@ -67,7 +67,7 @@ class DigestAuthenticateTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
$_SERVER = $this->server;
|
$_SERVER = $this->server;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ class FormAuthenticateTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->Collection = $this->getMock('ComponentCollection');
|
$this->Collection = $this->getMock('ComponentCollection');
|
||||||
$this->auth = new FormAuthenticate($this->Collection, array(
|
$this->auth = new FormAuthenticate($this->Collection, array(
|
||||||
|
|
|
@ -378,7 +378,7 @@ class AuthComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Security.salt', 'YJfIxfs2guVoUubWDYhG93b0qyJfIxfs2guwvniR2G0FgaC9mi');
|
Configure::write('Security.salt', 'YJfIxfs2guVoUubWDYhG93b0qyJfIxfs2guwvniR2G0FgaC9mi');
|
||||||
Configure::write('Security.cipherSeed', 770011223369876);
|
Configure::write('Security.cipherSeed', 770011223369876);
|
||||||
|
@ -409,7 +409,7 @@ class AuthComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
|
|
||||||
TestAuthComponent::clearUser();
|
TestAuthComponent::clearUser();
|
||||||
|
|
|
@ -69,7 +69,7 @@ class CookieComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$_COOKIE = array();
|
$_COOKIE = array();
|
||||||
$this->Controller = new CookieComponentTestController(new CakeRequest(), new CakeResponse());
|
$this->Controller = new CookieComponentTestController(new CakeRequest(), new CakeResponse());
|
||||||
|
@ -91,7 +91,7 @@ class CookieComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
$this->Cookie->destroy();
|
$this->Cookie->destroy();
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,7 +140,7 @@ class EmailComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
Configure::write('App.encoding', 'UTF-8');
|
Configure::write('App.encoding', 'UTF-8');
|
||||||
|
|
|
@ -33,7 +33,7 @@ class FlashComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->Components = new ComponentCollection();
|
$this->Components = new ComponentCollection();
|
||||||
$this->Flash = new FlashComponent($this->Components);
|
$this->Flash = new FlashComponent($this->Components);
|
||||||
|
@ -44,7 +44,7 @@ class FlashComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
CakeSession::destroy();
|
CakeSession::destroy();
|
||||||
}
|
}
|
||||||
|
|
|
@ -298,7 +298,7 @@ class PaginatorComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->request = new CakeRequest('controller_posts/index');
|
$this->request = new CakeRequest('controller_posts/index');
|
||||||
$this->request->params['pass'] = $this->request->params['named'] = array();
|
$this->request->params['pass'] = $this->request->params['named'] = array();
|
||||||
|
|
|
@ -106,7 +106,7 @@ class RequestHandlerComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->_init();
|
$this->_init();
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ class RequestHandlerComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->RequestHandler, $this->Controller);
|
unset($this->RequestHandler, $this->Controller);
|
||||||
if (!headers_sent()) {
|
if (!headers_sent()) {
|
||||||
|
|
|
@ -159,7 +159,7 @@ class SecurityComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$request = $this->getMock('CakeRequest', array('here'), array('posts/index', false));
|
$request = $this->getMock('CakeRequest', array('here'), array('posts/index', false));
|
||||||
|
@ -183,7 +183,7 @@ class SecurityComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
$this->Controller->Session->delete('_Token');
|
$this->Controller->Session->delete('_Token');
|
||||||
$this->Controller->Session->destroy();
|
$this->Controller->Session->destroy();
|
||||||
|
|
|
@ -90,7 +90,7 @@ class SessionComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function setupBeforeClass() {
|
public static function setupBeforeClass() : void {
|
||||||
static::$_sessionBackup = Configure::read('Session');
|
static::$_sessionBackup = Configure::read('Session');
|
||||||
Configure::write('Session', array(
|
Configure::write('Session', array(
|
||||||
'defaults' => 'php',
|
'defaults' => 'php',
|
||||||
|
@ -104,7 +104,7 @@ class SessionComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function teardownAfterClass() {
|
public static function teardownAfterClass() : void {
|
||||||
Configure::write('Session', static::$_sessionBackup);
|
Configure::write('Session', static::$_sessionBackup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ class SessionComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$_SESSION = null;
|
$_SESSION = null;
|
||||||
$this->ComponentCollection = new ComponentCollection();
|
$this->ComponentCollection = new ComponentCollection();
|
||||||
|
@ -124,7 +124,7 @@ class SessionComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
CakeSession::destroy();
|
CakeSession::destroy();
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ class ComponentCollectionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->Components = new ComponentCollection();
|
$this->Components = new ComponentCollection();
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ class ComponentCollectionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Components);
|
unset($this->Components);
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,7 +206,7 @@ class ComponentTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->_pluginPaths = App::path('plugins');
|
$this->_pluginPaths = App::path('plugins');
|
||||||
App::build(array(
|
App::build(array(
|
||||||
|
|
|
@ -390,7 +390,7 @@ class ControllerTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
App::objects('plugin', null, false);
|
App::objects('plugin', null, false);
|
||||||
App::build();
|
App::build();
|
||||||
|
@ -402,7 +402,7 @@ class ControllerTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
CakePlugin::unload();
|
CakePlugin::unload();
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,7 +161,7 @@ class ScaffoldTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Config.language', 'eng');
|
Configure::write('Config.language', 'eng');
|
||||||
$request = new CakeRequest(null, false);
|
$request = new CakeRequest(null, false);
|
||||||
|
@ -174,7 +174,7 @@ class ScaffoldTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
CakeSession::destroy();
|
CakeSession::destroy();
|
||||||
unset($this->Controller);
|
unset($this->Controller);
|
||||||
|
|
|
@ -28,7 +28,7 @@ class AppTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
CakePlugin::unload();
|
CakePlugin::unload();
|
||||||
}
|
}
|
||||||
|
|
|
@ -293,7 +293,7 @@ class ObjectTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->object = new TestCakeObject();
|
$this->object = new TestCakeObject();
|
||||||
}
|
}
|
||||||
|
@ -303,7 +303,7 @@ class ObjectTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
CakePlugin::unload();
|
CakePlugin::unload();
|
||||||
unset($this->object);
|
unset($this->object);
|
||||||
|
|
|
@ -28,7 +28,7 @@ class CakePluginTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
|
||||||
|
@ -41,7 +41,7 @@ class CakePluginTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
CakePlugin::unload();
|
CakePlugin::unload();
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ class ConfigureTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Cache.disable', true);
|
Configure::write('Cache.disable', true);
|
||||||
App::build();
|
App::build();
|
||||||
|
@ -44,7 +44,7 @@ class ConfigureTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
if (file_exists(TMP . 'cache' . DS . 'persistent' . DS . 'cake_core_core_paths')) {
|
if (file_exists(TMP . 'cache' . DS . 'persistent' . DS . 'cake_core_core_paths')) {
|
||||||
unlink(TMP . 'cache' . DS . 'persistent' . DS . 'cake_core_core_paths');
|
unlink(TMP . 'cache' . DS . 'persistent' . DS . 'cake_core_core_paths');
|
||||||
|
@ -432,7 +432,7 @@ class ConfigureTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testReaderSetup() {
|
public function testReadersetUp() {
|
||||||
$reader = new PhpReader();
|
$reader = new PhpReader();
|
||||||
Configure::config('test', $reader);
|
Configure::config('test', $reader);
|
||||||
$configured = Configure::configured();
|
$configured = Configure::configured();
|
||||||
|
|
|
@ -52,7 +52,7 @@ class ErrorHandlerTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'View' => array(
|
'View' => array(
|
||||||
|
@ -75,7 +75,7 @@ class ErrorHandlerTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
if ($this->_restoreError) {
|
if ($this->_restoreError) {
|
||||||
restore_error_handler();
|
restore_error_handler();
|
||||||
|
|
|
@ -144,7 +144,7 @@ class ExceptionRendererTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Config.language', 'eng');
|
Configure::write('Config.language', 'eng');
|
||||||
App::build(array(
|
App::build(array(
|
||||||
|
@ -165,7 +165,7 @@ class ExceptionRendererTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
if ($this->_restoreError) {
|
if ($this->_restoreError) {
|
||||||
restore_error_handler();
|
restore_error_handler();
|
||||||
|
|
|
@ -31,7 +31,7 @@ class I18nTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
Cache::delete('object_map', '_cake_core_');
|
Cache::delete('object_map', '_cake_core_');
|
||||||
|
@ -47,7 +47,7 @@ class I18nTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
|
|
||||||
Cache::delete('object_map', '_cake_core_');
|
Cache::delete('object_map', '_cake_core_');
|
||||||
|
|
|
@ -30,7 +30,7 @@ class L10nTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::delete('Config.language');
|
Configure::delete('Config.language');
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ class CakeLogTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$streams = CakeLog::configured();
|
$streams = CakeLog::configured();
|
||||||
foreach ($streams as $stream) {
|
foreach ($streams as $stream) {
|
||||||
|
|
|
@ -47,7 +47,7 @@ class TestCakeLog extends CakeLog {
|
||||||
*/
|
*/
|
||||||
class ConsoleLogTest extends CakeTestCase {
|
class ConsoleLogTest extends CakeTestCase {
|
||||||
|
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
CakeLog::config('debug', array(
|
CakeLog::config('debug', array(
|
||||||
'engine' => 'File',
|
'engine' => 'File',
|
||||||
|
@ -61,7 +61,7 @@ class ConsoleLogTest extends CakeTestCase {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
if (file_exists(LOGS . 'error.log')) {
|
if (file_exists(LOGS . 'error.log')) {
|
||||||
unlink(LOGS . 'error.log');
|
unlink(LOGS . 'error.log');
|
||||||
|
|
|
@ -39,7 +39,7 @@ class LogEngineCollectionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->Collection = new LogEngineCollection();
|
$this->Collection = new LogEngineCollection();
|
||||||
|
|
|
@ -211,7 +211,7 @@ class AclNodeTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Acl.classname', 'TestDbAcl');
|
Configure::write('Acl.classname', 'TestDbAcl');
|
||||||
Configure::write('Acl.database', 'test');
|
Configure::write('Acl.database', 'test');
|
||||||
|
|
|
@ -202,7 +202,7 @@ class AclBehaviorTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Acl.database', 'test');
|
Configure::write('Acl.database', 'test');
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ class AclBehaviorTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Aro, $this->Aco);
|
unset($this->Aro, $this->Aco);
|
||||||
}
|
}
|
||||||
|
@ -225,7 +225,7 @@ class AclBehaviorTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testSetup() {
|
public function testsetUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$User = new AclUser();
|
$User = new AclUser();
|
||||||
$this->assertTrue(isset($User->Behaviors->Acl->settings['User']));
|
$this->assertTrue(isset($User->Behaviors->Acl->settings['User']));
|
||||||
|
|
|
@ -45,7 +45,7 @@ class ContainableBehaviorTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->User = ClassRegistry::init('User');
|
$this->User = ClassRegistry::init('User');
|
||||||
$this->Article = ClassRegistry::init('Article');
|
$this->Article = ClassRegistry::init('Article');
|
||||||
|
@ -71,7 +71,7 @@ class ContainableBehaviorTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
unset($this->Article);
|
unset($this->Article);
|
||||||
unset($this->User);
|
unset($this->User);
|
||||||
unset($this->Tag);
|
unset($this->Tag);
|
||||||
|
|
|
@ -452,7 +452,7 @@ class CakeSchemaTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
ConnectionManager::getDataSource('test')->cacheSources = false;
|
ConnectionManager::getDataSource('test')->cacheSources = false;
|
||||||
$this->Schema = new TestAppSchema();
|
$this->Schema = new TestAppSchema();
|
||||||
|
@ -463,7 +463,7 @@ class CakeSchemaTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
if (file_exists(TMP . 'tests' . DS . 'schema.php')) {
|
if (file_exists(TMP . 'tests' . DS . 'schema.php')) {
|
||||||
unlink(TMP . 'tests' . DS . 'schema.php');
|
unlink(TMP . 'tests' . DS . 'schema.php');
|
||||||
|
|
|
@ -29,7 +29,7 @@ class ConnectionManagerTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
CakePlugin::unload();
|
CakePlugin::unload();
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ class CakeSessionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function setupBeforeClass() {
|
public static function setupBeforeClass() : void {
|
||||||
// Make sure garbage colector will be called
|
// Make sure garbage colector will be called
|
||||||
static::$_gcDivisor = ini_get('session.gc_divisor');
|
static::$_gcDivisor = ini_get('session.gc_divisor');
|
||||||
ini_set('session.gc_divisor', '1');
|
ini_set('session.gc_divisor', '1');
|
||||||
|
@ -95,7 +95,7 @@ class CakeSessionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function teardownAfterClass() {
|
public static function teardownAfterClass() : void {
|
||||||
// Revert to the default setting
|
// Revert to the default setting
|
||||||
ini_set('session.gc_divisor', static::$_gcDivisor);
|
ini_set('session.gc_divisor', static::$_gcDivisor);
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ class CakeSessionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Session', array(
|
Configure::write('Session', array(
|
||||||
'defaults' => 'php',
|
'defaults' => 'php',
|
||||||
|
@ -121,7 +121,7 @@ class CakeSessionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
if (TestCakeSession::started()) {
|
if (TestCakeSession::started()) {
|
||||||
session_write_close();
|
session_write_close();
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ class DataSourceTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->Source = $this->getMock(
|
$this->Source = $this->getMock(
|
||||||
'TestSource',
|
'TestSource',
|
||||||
|
@ -132,7 +132,7 @@ class DataSourceTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Model, $this->Source);
|
unset($this->Model, $this->Source);
|
||||||
ConnectionManager::drop($this->sourceName);
|
ConnectionManager::drop($this->sourceName);
|
||||||
|
|
|
@ -60,7 +60,7 @@ class MysqlTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->Dbo = ConnectionManager::getDataSource('test');
|
$this->Dbo = ConnectionManager::getDataSource('test');
|
||||||
if (!($this->Dbo instanceof Mysql)) {
|
if (!($this->Dbo instanceof Mysql)) {
|
||||||
|
@ -76,7 +76,7 @@ class MysqlTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->model);
|
unset($this->model);
|
||||||
ClassRegistry::flush();
|
ClassRegistry::flush();
|
||||||
|
|
|
@ -214,7 +214,7 @@ class PostgresTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Cache.disable', true);
|
Configure::write('Cache.disable', true);
|
||||||
$this->Dbo = ConnectionManager::getDataSource('test');
|
$this->Dbo = ConnectionManager::getDataSource('test');
|
||||||
|
@ -228,7 +228,7 @@ class PostgresTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
Configure::write('Cache.disable', false);
|
Configure::write('Cache.disable', false);
|
||||||
unset($this->Dbo2);
|
unset($this->Dbo2);
|
||||||
|
|
|
@ -91,7 +91,7 @@ class SqliteTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Cache.disable', true);
|
Configure::write('Cache.disable', true);
|
||||||
$this->Dbo = ConnectionManager::getDataSource('test');
|
$this->Dbo = ConnectionManager::getDataSource('test');
|
||||||
|
@ -105,7 +105,7 @@ class SqliteTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
Configure::write('Cache.disable', false);
|
Configure::write('Cache.disable', false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -264,7 +264,7 @@ class SqlserverTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->Dbo = ConnectionManager::getDataSource('test');
|
$this->Dbo = ConnectionManager::getDataSource('test');
|
||||||
if (!($this->Dbo instanceof Sqlserver)) {
|
if (!($this->Dbo instanceof Sqlserver)) {
|
||||||
|
@ -279,7 +279,7 @@ class SqlserverTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Dbo);
|
unset($this->Dbo);
|
||||||
unset($this->model);
|
unset($this->model);
|
||||||
|
|
|
@ -184,7 +184,7 @@ class DboSourceTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->testDb = new DboTestSource();
|
$this->testDb = new DboTestSource();
|
||||||
|
@ -200,7 +200,7 @@ class DboSourceTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Model);
|
unset($this->Model);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ class CacheSessionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function setupBeforeClass() {
|
public static function setupBeforeClass() : void {
|
||||||
Cache::config('session_test', array(
|
Cache::config('session_test', array(
|
||||||
'engine' => 'File',
|
'engine' => 'File',
|
||||||
'prefix' => 'session_test_'
|
'prefix' => 'session_test_'
|
||||||
|
@ -49,7 +49,7 @@ class CacheSessionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function teardownAfterClass() {
|
public static function teardownAfterClass() : void {
|
||||||
Cache::clear(false, 'session_test');
|
Cache::clear(false, 'session_test');
|
||||||
Cache::drop('session_test');
|
Cache::drop('session_test');
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ class CacheSessionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->storage = new CacheSession();
|
$this->storage = new CacheSession();
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ class CacheSessionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->storage);
|
unset($this->storage);
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ class DatabaseSessionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function setupBeforeClass() {
|
public static function setupBeforeClass() : void {
|
||||||
static::$_sessionBackup = Configure::read('Session');
|
static::$_sessionBackup = Configure::read('Session');
|
||||||
Configure::write('Session.handler', array(
|
Configure::write('Session.handler', array(
|
||||||
'model' => 'SessionTestModel',
|
'model' => 'SessionTestModel',
|
||||||
|
@ -66,7 +66,7 @@ class DatabaseSessionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function teardownAfterClass() {
|
public static function teardownAfterClass() : void {
|
||||||
Configure::write('Session', static::$_sessionBackup);
|
Configure::write('Session', static::$_sessionBackup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ class DatabaseSessionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->storage = new DatabaseSession();
|
$this->storage = new DatabaseSession();
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ class DatabaseSessionTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
unset($this->storage);
|
unset($this->storage);
|
||||||
ClassRegistry::flush();
|
ClassRegistry::flush();
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
|
|
|
@ -56,7 +56,7 @@ class ModelCrossSchemaHabtmTest extends BaseModelTest {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->_checkConfigs();
|
$this->_checkConfigs();
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ abstract class BaseModelTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->debug = Configure::read('debug');
|
$this->debug = Configure::read('debug');
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ abstract class BaseModelTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
Configure::write('debug', $this->debug);
|
Configure::write('debug', $this->debug);
|
||||||
ClassRegistry::flush();
|
ClassRegistry::flush();
|
||||||
|
|
|
@ -30,7 +30,7 @@ class ModelValidationTest extends BaseModelTest {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Config.language', 'eng');
|
Configure::write('Config.language', 'eng');
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,7 @@ class ModelWriteTest extends BaseModelTest {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Config.language', 'eng');
|
Configure::write('Config.language', 'eng');
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ class CakeValidationSetTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
Configure::write('Config.language', 'eng');
|
Configure::write('Config.language', 'eng');
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ class CakeRequestTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->_app = Configure::read('App');
|
$this->_app = Configure::read('App');
|
||||||
$this->_case = null;
|
$this->_case = null;
|
||||||
|
@ -81,7 +81,7 @@ class CakeRequestTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
if (!empty($this->_case)) {
|
if (!empty($this->_case)) {
|
||||||
$_GET['case'] = $this->_case;
|
$_GET['case'] = $this->_case;
|
||||||
|
|
|
@ -29,7 +29,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
ob_start();
|
ob_start();
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ class CakeSocketTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->Socket = new CakeSocket(array('timeout' => 1));
|
$this->Socket = new CakeSocket(array('timeout' => 1));
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ class CakeSocketTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Socket);
|
unset($this->Socket);
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,7 +149,7 @@ class CakeEmailTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->_configFileExists = true;
|
$this->_configFileExists = true;
|
||||||
|
@ -171,7 +171,7 @@ class CakeEmailTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
App::build();
|
App::build();
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ class DebugTransportTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->DebugTransport = new DebugTransport();
|
$this->DebugTransport = new DebugTransport();
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ class MailTransportTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->MailTransport = $this->getMock('MailTransport', array('_mail'));
|
$this->MailTransport = $this->getMock('MailTransport', array('_mail'));
|
||||||
$this->MailTransport->config(array('additionalParameters' => '-f'));
|
$this->MailTransport->config(array('additionalParameters' => '-f'));
|
||||||
|
|
|
@ -67,7 +67,7 @@ class SmtpTransportTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->socket = $this->getMock('CakeSocket', array('read', 'write', 'connect', 'enableCrypto'));
|
$this->socket = $this->getMock('CakeSocket', array('read', 'write', 'connect', 'enableCrypto'));
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ class DigestAuthenticationTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->HttpSocket = new DigestHttpSocket();
|
$this->HttpSocket = new DigestHttpSocket();
|
||||||
$this->HttpSocket->request['method'] = 'GET';
|
$this->HttpSocket->request['method'] = 'GET';
|
||||||
|
@ -82,7 +82,7 @@ class DigestAuthenticationTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->HttpSocket);
|
unset($this->HttpSocket);
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ class HttpResponseTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->HttpResponse = new TestHttpResponse();
|
$this->HttpResponse = new TestHttpResponse();
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,7 +188,7 @@ class HttpSocketTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->Socket = $this->getMock('TestHttpSocket', array('read', 'write', 'connect'));
|
$this->Socket = $this->getMock('TestHttpSocket', array('read', 'write', 'connect'));
|
||||||
$this->RequestSocket = $this->getMock('TestHttpSocket', array('read', 'write', 'connect', 'request'));
|
$this->RequestSocket = $this->getMock('TestHttpSocket', array('read', 'write', 'connect', 'request'));
|
||||||
|
@ -199,7 +199,7 @@ class HttpSocketTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
unset($this->Socket, $this->RequestSocket);
|
unset($this->Socket, $this->RequestSocket);
|
||||||
}
|
}
|
||||||
|
|
|
@ -543,7 +543,7 @@ class DispatcherTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setUp() {
|
public function setUp() : void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->_get = $_GET;
|
$this->_get = $_GET;
|
||||||
$_GET = array();
|
$_GET = array();
|
||||||
|
@ -571,7 +571,7 @@ class DispatcherTest extends CakeTestCase {
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function tearDown() {
|
public function tearDown() : void {
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
$_GET = $this->_get;
|
$_GET = $this->_get;
|
||||||
$_POST = $this->_post;
|
$_POST = $this->_post;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue