public function test_getForDependentCalc()
 {
     /** === Test Data === */
     $CALC_TYPE_CODE_BASE = 1024;
     $CALC_TYPE_CODE_DEPEND = 512;
     /** === Mocks === */
     $mLogger = $this->_mockLogger();
     $mConn = $this->_mockConnection();
     $mDba = $this->_mockDbAdapter(null, $mConn);
     $mToolbox = $this->_mockToolbox();
     $mCallRepo = $this->_mockCallRepo();
     $mSubDb = $this->_mockFor('Praxigento\\Bonus\\Hybrid\\Lib\\Service\\Period\\Sub\\Db');
     $mSubWriteOff = $this->_mockFor('\\Praxigento\\Bonus\\Hybrid\\Lib\\Service\\Period\\Sub\\BasedCalcs');
     // $result = $this->_subBasedCalcs->getDependentCalcData($dependentCalcTypeCode, $baseCalcTypeCode);
     $mResult = new PeriodGetForDependentCalcResponse();
     $mResult->markSucceed();
     $mSubWriteOff->expects($this->once())->method('getDependentCalcData')->willReturn($mResult);
     /**
      * Prepare request and perform call.
      */
     /** @var  $call Call */
     $call = new Call($mLogger, $mDba, $mToolbox, $mCallRepo, $mSubDb, $mSubWriteOff);
     $req = new Request\GetForDependentCalc();
     $req->setBaseCalcTypeCode($CALC_TYPE_CODE_BASE);
     $req->setDependentCalcTypeCode($CALC_TYPE_CODE_DEPEND);
     $resp = $call->getForDependentCalc($req);
     $this->assertTrue($resp->isSucceed());
 }
 public function test_getForDependentCalc()
 {
     $obm = \Magento\Framework\App\ObjectManager::getInstance();
     /** @var  $call \Praxigento\Bonus\Hybrid\Lib\Service\IPeriod */
     $call = $obm->get('Praxigento\\Bonus\\Hybrid\\Lib\\Service\\IPeriod');
     $request = new Request\GetForDependentCalc();
     $request->setDependentCalcTypeCode(Cfg::CODE_TYPE_CALC_VALUE_TV);
     $request->setBaseCalcTypeCode(Cfg::CODE_TYPE_CALC_PV_WRITE_OFF);
     $response = $call->getForDependentCalc($request);
     $this->assertTrue($response->isSucceed());
 }
 public function test_getForDependentCalc()
 {
     $obm = \Magento\Framework\App\ObjectManager::getInstance();
     /** @var  $call \Praxigento\BonusBase\Service\Period\Call */
     $call = $obm->get('Praxigento\\BonusBase\\Service\\Period\\Call');
     $req = new Request\GetForDependentCalc();
     $req->setBaseCalcTypeCode('LOYALTY_BON_COMPRESS');
     $req->setDependentCalcTypeCode('HYBRID_VALUE_OV');
     $resp = $call->getForDependentCalc($req);
     $this->assertTrue($resp->isSucceed());
 }