Skip to content

Commit

Permalink
Remove unused mockFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
driusan committed Mar 7, 2023
1 parent 6c3526c commit 7c096eb
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions test/unittests/UserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 7c096eb

Please # to comment.