diff --git a/tests/agent.php b/tests/agent.php index 3f3b04938..f8eb1dcf6 100644 --- a/tests/agent.php +++ b/tests/agent.php @@ -23,7 +23,7 @@ class Test_Agent extends TestCase /** * need to setup a fake browser environment */ - protected function setUp() + protected function setUp(): void { // make sure we've got the Agent class in a known state $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'en-us,en;q=0.8,nl-be;q=0.5,nl;q=0.3'; diff --git a/tests/crypt.php b/tests/crypt.php index e515df94e..8bbee8cfe 100644 --- a/tests/crypt.php +++ b/tests/crypt.php @@ -21,18 +21,18 @@ class Test_Crypt extends TestCase { private static $config_backup = array(); - + private static $clear_text = "This is a string to encrypt"; private static $legacy_encrypted = "LO01JUJcY4z-BiQeWuOMxaEl9JYJjmLeoZCLgXqMVmtZSXpwN0NPSnJIblRmV0VvZHJKZjUycE5NNWRPOU5EdWlxTjR3MnJMMUtJx"; private static $cipherkey = "a8182a9b8f9231bd6eb092be0223f3b50e6bd26ee8d71d6ceccef8e9906cc59a"; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { // load and store the current crypt config \Config::load('crypt', true); static::$config_backup = \Config::get('crypt', array()); - + // create a predictable one so we can test \Config::set('crypt.legacy.crypto_key', '9Kgt0c4LIb1g8GIhyAjnEnuU'); \Config::set('crypt.legacy.crypto_iv', 'PuMQGc0vA-ykX_QShEKRg3B4'); @@ -43,7 +43,7 @@ public static function setUpBeforeClass() \Crypt::_init(); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { \Config::set('crypt', static::$config_backup); \Crypt::_init(); diff --git a/tests/date.php b/tests/date.php index d74e12eb4..e42f9a3e5 100644 --- a/tests/date.php +++ b/tests/date.php @@ -20,7 +20,7 @@ */ class Test_Date extends TestCase { - protected function setUp() + protected function setUp(): void { // make sure the locale and language are is set correctly for the tests setlocale(LC_ALL, 'en_US') === false and setlocale(LC_ALL, 'en_US.UTF8'); diff --git a/tests/debug.php b/tests/debug.php index 876cae131..00dc0147d 100644 --- a/tests/debug.php +++ b/tests/debug.php @@ -20,14 +20,14 @@ */ class Test_Debug extends TestCase { - public function setUp() + public function setUp(): void { // Remember old value, and set to browser mode. $this->old_is_cli = \Fuel::$is_cli; \Fuel::$is_cli = false; } - public function tearDown() + public function tearDown(): void { // Restore original value \Fuel::$is_cli = $this->old_is_cli; diff --git a/tests/fieldset.php b/tests/fieldset.php index b2f88d412..3148c126a 100644 --- a/tests/fieldset.php +++ b/tests/fieldset.php @@ -20,7 +20,7 @@ */ class Test_Fieldset extends TestCase { - public function setUp() + public function setUp(): void { // fake the uri for this request isset($_SERVER['PATH_INFO']) and $this->pathinfo = $_SERVER['PATH_INFO']; @@ -34,7 +34,7 @@ public function setUp() \Request::active($request); } - public function tearDown() + public function tearDown(): void { // remove the fake uri if (property_exists($this, 'pathinfo')) diff --git a/tests/form.php b/tests/form.php index 185bc393f..a7be31d2d 100644 --- a/tests/form.php +++ b/tests/form.php @@ -22,18 +22,18 @@ class Test_Form extends TestCase { private static $config_security; - public static function setUpBeforeClass() + public static function setUpBeforeClass(): void { Config::load('security'); static::$config_security = Config::get('security'); } - public static function tearDownAfterClass() + public static function tearDownAfterClass(): void { Config::set('security', static::$config_security); } - protected function setUp() + protected function setUp(): void { Config::load('form'); Config::set('form', array( @@ -259,15 +259,15 @@ public function test_label_auto_id_true() { $config = \Config::get('form.auto_id'); \Config::set('form.auto_id', true); - + $form = \Form::forge(__METHOD__); - + $label = 'label'; $id = 'id'; $output = $form->label($label, $id); $expected = ''; $this->assertEquals($expected, $output); - + \Config::set('form.auto_id', $config); } @@ -280,15 +280,15 @@ public function test_label_auto_id_false() { $config = \Config::get('form.auto_id'); \Config::set('form.auto_id', false); - + $form = \Form::forge(__METHOD__); - + $label = 'label'; $id = 'id'; $output = $form->label($label, $id); $expected = ''; $this->assertEquals($expected, $output); - + \Config::set('form.auto_id', $config); } @@ -300,7 +300,7 @@ public function test_label_auto_id_false() public function test_open() { $form = \Form::forge(__METHOD__); - + $output = $form->open('uri/to/form'); $expected = '