Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a validation issue on multiple file upload #2265

Merged
merged 6 commits into from
Sep 26, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix return type declaration must be compatible with TestCase->...():void
  • Loading branch information
pjsde committed Sep 25, 2019
commit 9ce0d88663940c1a8335527c86a800cf9d98fc9b
8 changes: 4 additions & 4 deletions system/Test/CIDatabaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ public function loadDependencies()
*
* @throws ConfigException
*/
protected function setUp()
{
protected function setUp():void
{
parent::setUp();

// Add namespaces we need for testing
Expand Down Expand Up @@ -213,8 +213,8 @@ 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))
{
foreach ($this->insertCache as $row)
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
4 changes: 2 additions & 2 deletions tests/system/Autoloader/AutoloaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class AutoloaderTest extends \CIUnitTestCase

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

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

$config = new Autoload();
Expand Down
4 changes: 2 additions & 2 deletions tests/system/Autoloader/FileLocatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class FileLocatorTest extends \CIUnitTestCase

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

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

$autoloader = new Autoloader();
Expand Down
6 changes: 3 additions & 3 deletions tests/system/CLI/CLITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ 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
6 changes: 3 additions & 3 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,8 +48,8 @@ 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
6 changes: 3 additions & 3 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,8 +36,8 @@ protected function setUp()
$this->app = new MockCodeIgniter(new MockCLIConfig());
}

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

Expand Down
8 changes: 4 additions & 4 deletions tests/system/Cache/CacheFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class CacheFactoryTest extends \CIUnitTestCase
private $cacheFactory;
private $config;

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

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

public function tearDown()
{
public function tearDown():void
{
if (is_dir($this->config->storePath))
{
chmod($this->config->storePath, 0777);
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
6 changes: 3 additions & 3 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,8 +43,8 @@ protected function setUp()
$this->fileHandler->initialize();
}

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

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

$this->config = new \Config\Cache();
Expand All @@ -33,8 +33,8 @@ protected function setUp()
$this->memcachedHandler->initialize();
}

public function tearDown()
{
public function tearDown():void
{
foreach (self::getKeyArray() as $key)
{
$this->memcachedHandler->delete($key);
Expand Down
6 changes: 3 additions & 3 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,8 +69,8 @@ protected function setUp()
$this->redisHandler->initialize();
}

public function tearDown()
{
public function tearDown():void
{
foreach (self::getKeyArray() as $key)
{
$this->redisHandler->delete($key);
Expand Down
6 changes: 3 additions & 3 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,8 +31,8 @@ protected function setUp()
$this->codeigniter = new MockCodeIgniter($config);
}

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

if (count( ob_list_handlers() ) > 1)
Expand Down
4 changes: 2 additions & 2 deletions tests/system/Commands/CommandClassTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class BaseCommandTest extends \CIUnitTestCase
protected $logger;
protected $runner;

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

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

CITestStreamFilter::$buffer = '';
Expand Down Expand Up @@ -50,8 +50,8 @@ 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
8 changes: 4 additions & 4 deletions tests/system/Commands/SessionsCommandsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class SessionsCommandsTest extends \CIUnitTestCase
protected $runner;
private $result;

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

CITestStreamFilter::$buffer = '';
Expand Down Expand Up @@ -49,8 +49,8 @@ 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);

$result = remove_invisible_characters($this->result);
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
4 changes: 2 additions & 2 deletions tests/system/Config/BaseConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ class BaseConfigTest extends CIUnitTestCase

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

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

$this->fixturesFolder = __DIR__ . '/fixtures';
Expand Down
6 changes: 3 additions & 3 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,8 +29,8 @@ protected function setUp()
chmod($path, 0644);
}

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

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

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

$this->original = $_SERVER;
Expand All @@ -20,8 +20,8 @@ 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
4 changes: 2 additions & 2 deletions tests/system/Database/BaseQueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class QueryTest extends \CIUnitTestCase

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

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

$this->db = new MockConnection([]);
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
Loading