diff options
Diffstat (limited to 'test/classes/Controllers/Table/TableRelationControllerTest.php')
-rw-r--r-- | test/classes/Controllers/Table/TableRelationControllerTest.php | 44 |
1 files changed, 12 insertions, 32 deletions
diff --git a/test/classes/Controllers/Table/TableRelationControllerTest.php b/test/classes/Controllers/Table/TableRelationControllerTest.php index 368690ba1c..fea73928c2 100644 --- a/test/classes/Controllers/Table/TableRelationControllerTest.php +++ b/test/classes/Controllers/Table/TableRelationControllerTest.php @@ -41,8 +41,18 @@ class TableRelationControllerTest extends PmaTestCase $_REQUEST['foreignDb'] = 'db'; $_REQUEST['foreignTable'] = 'table'; - $GLOBALS['dblist'] = new DataBasePMAMockForTblRelation(); - $GLOBALS['dblist']->databases = new DataBaseMockForTblRelation(); + $GLOBALS['dblist'] = new \stdClass(); + $GLOBALS['dblist']->databases = new class + { + /** + * @param mixed $name name + * @return bool + */ + public function exists($name) + { + return true; + } + }; $indexes = array( array( @@ -259,33 +269,3 @@ class TableRelationControllerTest extends PmaTestCase ); } } - -/** - * Mock class for DataBasePMAMock - * - * @package PhpMyAdmin-test - */ -Class DataBasePMAMockForTblRelation -{ - var $databases; -} - -/** - * Mock class for DataBaseMock - * - * @package PhpMyAdmin-test - */ -Class DataBaseMockForTblRelation -{ - /** - * mock function to return table is existed - * - * @param string $name table name - * - * @return bool - */ - function exists($name) - { - return true; - } -} |