From 42b7782927713c2ca2fb704db6217016347b586e Mon Sep 17 00:00:00 2001 From: rxu Date: Sun, 19 Mar 2017 21:46:20 +0700 Subject: [ticket/14972] Migrate from deprecated getMock() method to createMock() PHPBB3-14972 --- tests/dbal/db_tools_test.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/dbal/db_tools_test.php') diff --git a/tests/dbal/db_tools_test.php b/tests/dbal/db_tools_test.php index 0365463a48..818d8d8e17 100644 --- a/tests/dbal/db_tools_test.php +++ b/tests/dbal/db_tools_test.php @@ -346,10 +346,10 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case public function test_perform_schema_changes_drop_tables() { - $db_tools = $this->getMock('\phpbb\db\tools\tools', array( - 'sql_table_exists', - 'sql_table_drop', - ), array(&$this->db)); + $db_tools = $this->getMockBuilder('\phpbb\db\tools\tools') + ->setMethods(array('sql_table_exists', 'sql_table_drop')) + ->setConstructorArgs(array(&$this->db)) + ->getMock(); // pretend all tables exist $db_tools->expects($this->any())->method('sql_table_exists') @@ -372,10 +372,10 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case public function test_perform_schema_changes_drop_columns() { - $db_tools = $this->getMock('\phpbb\db\tools\tools', array( - 'sql_column_exists', - 'sql_column_remove', - ), array(&$this->db)); + $db_tools = $this->getMockBuilder('\phpbb\db\tools\tools') + ->setMethods(array('sql_column_exists', 'sql_column_remove')) + ->setConstructorArgs(array(&$this->db)) + ->getMock(); // pretend all columns exist $db_tools->expects($this->any())->method('sql_column_exists') -- cgit v1.2.1 From ebac54aa9e705e99a562d2fe2c0f57bc6af8dd32 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 30 Dec 2018 11:36:08 +0100 Subject: [ticket/14948] Adjust calls for twig and phpunit updates PHPBB3-14948 --- tests/dbal/db_tools_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/dbal/db_tools_test.php') diff --git a/tests/dbal/db_tools_test.php b/tests/dbal/db_tools_test.php index 818d8d8e17..20ea2b3729 100644 --- a/tests/dbal/db_tools_test.php +++ b/tests/dbal/db_tools_test.php @@ -25,7 +25,7 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/config.xml'); } - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -77,7 +77,7 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case $this->table_exists = true; } - protected function tearDown() + protected function tearDown(): void { if ($this->table_exists) { -- cgit v1.2.1