Skip to content

Commit

Permalink
Merge pull request #2267 from MGatner/tests-void
Browse files Browse the repository at this point in the history
Tests setUp and tearDown: void
  • Loading branch information
MGatner authored Sep 26, 2019
2 parents 3dfedfe + 8f71991 commit 56717ad
Show file tree
Hide file tree
Showing 128 changed files with 161 additions and 161 deletions.
4 changes: 2 additions & 2 deletions system/Test/CIDatabaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function loadDependencies()
*
* @throws ConfigException
*/
protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down Expand Up @@ -213,7 +213,7 @@ protected function setUp()
* Takes care of any required cleanup after the test, like
* removing any rows inserted via $this->hasInDatabase()
*/
public function tearDown()
public function tearDown(): void
{
if (! empty($this->insertCache))
{
Expand Down
2 changes: 1 addition & 1 deletion system/Test/CIUnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class CIUnitTestCase extends TestCase
*/
protected $app;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/system/API/ResponseTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ResponseTraitTest extends \CIUnitTestCase
*/
protected $formatter;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/system/Autoloader/AutoloaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AutoloaderTest extends \CIUnitTestCase

//--------------------------------------------------------------------

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/system/Autoloader/FileLocatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FileLocatorTest extends \CIUnitTestCase

//--------------------------------------------------------------------

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
4 changes: 2 additions & 2 deletions tests/system/CLI/CLITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ class CLITest extends \CIUnitTestCase

private $stream_filter;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

CITestStreamFilter::$buffer = '';
$this->stream_filter = stream_filter_append(STDOUT, 'CITestStreamFilter');
}

public function tearDown()
public function tearDown(): void
{
stream_filter_remove($this->stream_filter);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/system/CLI/CommandRunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CommandRunnerTest extends \CIUnitTestCase
protected $logger;
protected $runner;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down Expand Up @@ -48,7 +48,7 @@ protected function setUp()
$this->runner->initController($this->request, $this->response, $this->logger);
}

public function tearDown()
public function tearDown(): void
{
stream_filter_remove($this->stream_filter);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/system/CLI/ConsoleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ConsoleTest extends \CIUnitTestCase

private $stream_filter;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand All @@ -36,7 +36,7 @@ protected function setUp()
$this->app = new MockCodeIgniter(new MockCLIConfig());
}

public function tearDown()
public function tearDown(): void
{
stream_filter_remove($this->stream_filter);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/system/Cache/CacheFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class CacheFactoryTest extends \CIUnitTestCase
private $cacheFactory;
private $config;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand All @@ -19,7 +19,7 @@ protected function setUp()
$this->config->storePath .= self::$directory;
}

public function tearDown()
public function tearDown(): void
{
if (is_dir($this->config->storePath))
{
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Cache/Handlers/DummyHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class DummyHandlerTest extends \CIUnitTestCase
{
private $dummyHandler;

protected function setUp()
protected function setUp(): void
{
$this->dummyHandler = new DummyHandler();
$this->dummyHandler->initialize();
Expand Down
4 changes: 2 additions & 2 deletions tests/system/Cache/Handlers/FileHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ private static function getKeyArray()
private $fileHandler;
private $config;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand All @@ -43,7 +43,7 @@ protected function setUp()
$this->fileHandler->initialize();
}

public function tearDown()
public function tearDown(): void
{
if (is_dir($this->config->storePath))
{
Expand Down
4 changes: 2 additions & 2 deletions tests/system/Cache/Handlers/MemcachedHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ private static function getKeyArray()
private static $dummy = 'dymmy';
private $config;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand All @@ -33,7 +33,7 @@ protected function setUp()
$this->memcachedHandler->initialize();
}

public function tearDown()
public function tearDown(): void
{
foreach (self::getKeyArray() as $key)
{
Expand Down
4 changes: 2 additions & 2 deletions tests/system/Cache/Handlers/RedisHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private static function getKeyArray()
private static $dummy = 'dymmy';
private $config;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand All @@ -69,7 +69,7 @@ protected function setUp()
$this->redisHandler->initialize();
}

public function tearDown()
public function tearDown(): void
{
foreach (self::getKeyArray() as $key)
{
Expand Down
4 changes: 2 additions & 2 deletions tests/system/CodeIgniterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CodeIgniterTest extends \CIUnitTestCase

//--------------------------------------------------------------------

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand All @@ -31,7 +31,7 @@ protected function setUp()
$this->codeigniter = new MockCodeIgniter($config);
}

public function tearDown()
public function tearDown(): void
{
parent::tearDown();

Expand Down
2 changes: 1 addition & 1 deletion tests/system/Commands/CommandClassTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class BaseCommandTest extends \CIUnitTestCase
protected $logger;
protected $runner;

protected function setUp()
protected function setUp(): void
{
parent::setUp();
$this->logger = Services::logger();
Expand Down
4 changes: 2 additions & 2 deletions tests/system/Commands/CommandsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CommandsTest extends \CIUnitTestCase
protected $logger;
protected $runner;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down Expand Up @@ -50,7 +50,7 @@ protected function setUp()
$this->runner->initController($this->request, $this->response, $this->logger);
}

public function tearDown()
public function tearDown(): void
{
stream_filter_remove($this->stream_filter);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/system/Commands/SessionsCommandsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class SessionsCommandsTest extends \CIUnitTestCase
protected $runner;
private $result;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down Expand Up @@ -49,7 +49,7 @@ protected function setUp()
$this->runner->initController($this->request, $this->response, $this->logger);
}

public function tearDown()
public function tearDown(): void
{
stream_filter_remove($this->stream_filter);

Expand Down
2 changes: 1 addition & 1 deletion tests/system/CommonFunctionsSendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class CommonFunctionsSendTest extends \CIUnitTestCase
{

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/system/CommonFunctionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CommonFunctionsTest extends \CIUnitTestCase

//--------------------------------------------------------------------

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/system/Config/BaseConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class BaseConfigTest extends CIUnitTestCase

//--------------------------------------------------------------------

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
4 changes: 2 additions & 2 deletions tests/system/Config/DotEnvTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DotEnvTest extends \CIUnitTestCase

//--------------------------------------------------------------------

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand All @@ -29,7 +29,7 @@ protected function setUp()
chmod($path, 0644);
}

public function tearDown()
public function tearDown(): void
{
parent::tearDown();

Expand Down
4 changes: 2 additions & 2 deletions tests/system/Config/ServicesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ServicesTest extends \CIUnitTestCase
protected $config;
protected $original;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand All @@ -20,7 +20,7 @@ protected function setUp()
// $this->config->supportedLocales = ['en', 'es'];
}

public function tearDown()
public function tearDown(): void
{
$_SERVER = $this->original;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/system/ControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class ControllerTest extends \CIUnitTestCase

//--------------------------------------------------------------------

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/system/Database/BaseQueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class QueryTest extends \CIUnitTestCase

//--------------------------------------------------------------------

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/system/Database/Builder/AliasTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class AliasTest extends \CIUnitTestCase

//--------------------------------------------------------------------

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/system/Database/Builder/CountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class CountTest extends \CIUnitTestCase

//--------------------------------------------------------------------

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/system/Database/Builder/DeleteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class DeleteTest extends \CIUnitTestCase

//--------------------------------------------------------------------

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/system/Database/Builder/DistinctTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class DistinctTest extends \CIUnitTestCase

//--------------------------------------------------------------------

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/system/Database/Builder/EmptyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class EmptyTest extends \CIUnitTestCase

//--------------------------------------------------------------------

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/system/Database/Builder/FromTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class FromTest extends \CIUnitTestCase

//--------------------------------------------------------------------

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/system/Database/Builder/GetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class GetTest extends \CIUnitTestCase

//--------------------------------------------------------------------

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
Loading

0 comments on commit 56717ad

Please sign in to comment.