mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 01:06:48 +02:00
[ticket/14948] Adjust calls for twig and phpunit updates
PHPBB3-14948
This commit is contained in:
@@ -11,7 +11,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_TestCase
|
||||
use PHPUnit\DbUnit\TestCase;
|
||||
|
||||
abstract class phpbb_database_test_case extends TestCase
|
||||
{
|
||||
static private $already_connected;
|
||||
|
||||
@@ -99,7 +101,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
|
||||
parent::tearDownAfterClass();
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
parent::tearDown();
|
||||
|
||||
@@ -113,7 +115,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
|
||||
}
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@@ -75,7 +75,7 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
return array();
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
@@ -114,7 +114,7 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
}
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
parent::tearDown();
|
||||
|
||||
@@ -511,7 +511,7 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
$this->disable_ext($extension);
|
||||
$this->delete_ext_data($extension);
|
||||
}
|
||||
|
||||
|
||||
static private function recreate_database($config)
|
||||
{
|
||||
$db_conn_mgr = new phpbb_database_test_connection_manager($config);
|
||||
@@ -920,7 +920,7 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
* @param string $haystack Search this
|
||||
* @param string $message Optional failure message
|
||||
*/
|
||||
public function assertContainsLang($needle, $haystack, $message = null)
|
||||
public function assertContainsLang($needle, $haystack, $message = '')
|
||||
{
|
||||
$this->assertContains(html_entity_decode($this->lang($needle), ENT_QUOTES), $haystack, $message);
|
||||
}
|
||||
@@ -932,7 +932,7 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
* @param string $haystack Search this
|
||||
* @param string $message Optional failure message
|
||||
*/
|
||||
public function assertNotContainsLang($needle, $haystack, $message = null)
|
||||
public function assertNotContainsLang($needle, $haystack, $message = '')
|
||||
{
|
||||
$this->assertNotContains(html_entity_decode($this->lang($needle), ENT_QUOTES), $haystack, $message);
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ abstract class phpbb_session_test_case extends phpbb_database_test_case
|
||||
/** @var \phpbb\db\driver\driver_interface */
|
||||
protected $db;
|
||||
|
||||
function setUp()
|
||||
function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
|
@@ -11,7 +11,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_test_case extends PHPUnit_Framework_TestCase
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class phpbb_test_case extends TestCase
|
||||
{
|
||||
protected $test_case_helpers;
|
||||
|
||||
|
@@ -81,17 +81,17 @@ class phpbb_test_case_helpers
|
||||
{
|
||||
case E_NOTICE:
|
||||
case E_STRICT:
|
||||
PHPUnit_Framework_Error_Notice::$enabled = true;
|
||||
$exceptionName = 'PHPUnit_Framework_Error_Notice';
|
||||
PHPUnit\Framework\Error\Notice::$enabled = true;
|
||||
$exceptionName = 'PHPUnit\Framework\Error\Notice';
|
||||
break;
|
||||
|
||||
case E_WARNING:
|
||||
PHPUnit_Framework_Error_Warning::$enabled = true;
|
||||
$exceptionName = 'PHPUnit_Framework_Error_Warning';
|
||||
PHPUnit\Framework\Error\Warning::$enabled = true;
|
||||
$exceptionName = 'PHPUnit\Framework\Error\Warning';
|
||||
break;
|
||||
|
||||
default:
|
||||
$exceptionName = 'PHPUnit_Framework_Error';
|
||||
$exceptionName = 'PHPUnit\Framework\Error\Error';
|
||||
break;
|
||||
}
|
||||
$this->expectedTriggerError = true;
|
||||
|
@@ -105,7 +105,7 @@ class phpbb_ui_test_case extends phpbb_test_case
|
||||
return array();
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
public function setUp(): void
|
||||
{
|
||||
if (!self::$install_success)
|
||||
{
|
||||
@@ -137,7 +137,7 @@ class phpbb_ui_test_case extends phpbb_test_case
|
||||
}
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
protected function tearDown(): void
|
||||
{
|
||||
parent::tearDown();
|
||||
|
||||
@@ -424,7 +424,7 @@ class phpbb_ui_test_case extends phpbb_test_case
|
||||
$this->disable_ext($extension);
|
||||
$this->delete_ext_data($extension);
|
||||
}
|
||||
|
||||
|
||||
protected function get_cache_driver()
|
||||
{
|
||||
if (!$this->cache)
|
||||
|
Reference in New Issue
Block a user