From 7c096eb89b1916fc8cdf2c95d699e8fb32985cc8 Mon Sep 17 00:00:00 2001 From: Dave MacFarlane Date: Tue, 7 Mar 2023 15:45:39 -0500 Subject: [PATCH] Remove unused mockFactory --- test/unittests/UserTest.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/test/unittests/UserTest.php b/test/unittests/UserTest.php index d6e903b5641..31b7d6afaf1 100644 --- a/test/unittests/UserTest.php +++ b/test/unittests/UserTest.php @@ -260,17 +260,7 @@ class UserTest extends TestCase * @var \Database | PHPUnit\Framework\MockObject\MockObject */ private $_mockDB; - /** - * Test double for Database object for hasLoggedIn method - * - * @note This is needed for User::hasLoggedIn because it declares and uses - * the database differently than other methods in the User class. - * This can be changed when the rest of the User class updates how it - * declares its database. - Alexandra Livadas - * - * @var NDB_Factory - */ - private $_mockFactory; + /** * Maps config names to values * Used to set behaviour of NDB_Config test double @@ -300,8 +290,6 @@ protected function setUp(): void $this->_mockDB = $mockdb; $this->_mockConfig = $mockconfig; - $this->_mockFactory = \NDB_Factory::singleton(); - $this->_mockFactory->setDatabase($this->_dbMock); $this->_factory->setConfig($this->_mockConfig);