* @link https://www.oxidmodule.com */ declare(strict_types=1); namespace D3\Usermanager\tests\integration\Requirements; use D3\Usermanager\Application\Model\d3usermanager; use D3\Usermanager\tests\integration\d3IntegrationTestCase; use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException; use OxidEsales\Eshop\Core\Exception\DatabaseErrorException; use PHPUnit\Framework\MockObject\MockObject; abstract class d3RequirementIntegrationTestCase extends d3IntegrationTestCase { /** * @param $sManagerId * @return d3usermanager|MockObject * @throws DatabaseConnectionException * @throws DatabaseErrorException */ public function getManagerMock($sManagerId) { /** @var d3usermanager|MockObject $oManager */ $oManager = $this->getMockBuilder(d3usermanager::class) ->onlyMethods(['d3getLog']) ->getMock(); $oManager->method('d3getLog')->willReturn($this->getD3LogMock()); $oManager->load($sManagerId); $oManager->d3getModCfg()->setValue('iMaxOrderCnt', 10000); return $oManager; } }