mirror of
https://github.com/e107inc/e107.git
synced 2025-08-20 13:21:54 +02:00
Fix all PHP 8.0 test failures
This commit is contained in:
@@ -36,11 +36,11 @@ class PriorityCallbacks
|
||||
$this->shutdown_functions[] = $callable;
|
||||
}
|
||||
|
||||
private function __clone() {}
|
||||
public function __clone() {}
|
||||
|
||||
private function __sleep() {}
|
||||
public function __sleep() {}
|
||||
|
||||
private function __wakeup() {}
|
||||
public function __wakeup() {}
|
||||
}
|
||||
|
||||
PriorityCallbacks::instance();
|
@@ -660,11 +660,6 @@ abstract class e_db_abstractTest extends \Codeception\Test\Unit
|
||||
|
||||
}
|
||||
*/
|
||||
public function testDb_Close()
|
||||
{
|
||||
$this->db->db_Close();
|
||||
|
||||
}
|
||||
|
||||
public function testDelete()
|
||||
{
|
||||
@@ -1147,8 +1142,6 @@ abstract class e_db_abstractTest extends \Codeception\Test\Unit
|
||||
$xql->truncate($table);
|
||||
$empty = $xql->isEmpty($table);
|
||||
$this->assertTrue($empty,"isEmpty() or truncate() failed");
|
||||
|
||||
$xql->close();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -44,6 +44,14 @@ class e_db_mysqlTest extends e_db_abstractTest
|
||||
);
|
||||
}
|
||||
|
||||
public function _after()
|
||||
{
|
||||
$db_impl = $this->getDbImplementation();
|
||||
if (@empty($db_impl->server_info)) return;
|
||||
|
||||
parent::_after();
|
||||
}
|
||||
|
||||
public function testGetPDO()
|
||||
{
|
||||
$result = $this->db->getPDO();
|
||||
@@ -71,4 +79,20 @@ class e_db_mysqlTest extends e_db_abstractTest
|
||||
$result = $this->db->escape("Can't", true);
|
||||
$this->assertEquals("Can\'t", $result);
|
||||
}
|
||||
|
||||
public function testDb_Close()
|
||||
{
|
||||
$db_impl = $this->getDbImplementation();
|
||||
$this->assertFalse(@empty($db_impl->server_info));
|
||||
$this->db->db_Close();
|
||||
$this->assertTrue(@empty($db_impl->server_info));
|
||||
}
|
||||
|
||||
private function getDbImplementation()
|
||||
{
|
||||
$reflection_object = new ReflectionObject($this->db);
|
||||
$db_property = $reflection_object->getProperty('mySQLaccess');
|
||||
$db_property->setAccessible(true);
|
||||
return $db_property->getValue($this->db);
|
||||
}
|
||||
}
|
||||
|
@@ -161,6 +161,7 @@ class e_formTest extends \Codeception\Test\Unit
|
||||
}
|
||||
|
||||
e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php');
|
||||
e107::includeLan(e_PLUGIN.'forum/languages/English/English_front.php');
|
||||
include_once(e_CORE."templates/admin_icons_template.php");
|
||||
include_once(e_PLUGIN.'forum/forum_class.php');
|
||||
include_once(e_PLUGIN.'forum/templates/forum_icons_template.php');
|
||||
@@ -925,7 +926,7 @@ class e_formTest extends \Codeception\Test\Unit
|
||||
|
||||
|
||||
'dropdown_001' => "<select name='dropdown_001' id='dropdown-001' class='tbox select form-control' tabindex='3'><option value='opt_value_1'>Label 1</option><option value='opt_value_2' selected='selected'>Label 2</option></select>",
|
||||
'dropdown_002' => "<select name='dropdown_002' id='dropdown-002' class='tbox select form-control' tabindex='4'><option value='0'>Option 0</option><option value='1' selected='selected'>Option 1</option><option value='2'>Option 2</option></select>",
|
||||
'dropdown_002' => "<select name='dropdown_002' id='dropdown-002' class='tbox select form-control' tabindex='4'><option value='0'>Option 0</option><option value='1'>Option 1</option><option value='2'>Option 2</option></select>",
|
||||
|
||||
|
||||
'textarea_001' => "<textarea name='textarea_001' rows='5' cols='40' id='textarea-001' class='form-control input-xlarge' tabindex='5'>the quick brown fox jumps over the lazy dog</textarea>",
|
||||
|
Reference in New Issue
Block a user