Example #1
0
 public function testConfigValues()
 {
     $map = $this->getValueMap();
     $this->scopeConfig->expects($this->exactly(5))->method('getValue')->will($this->returnCallback(function ($key, $scope) use($map) {
         $this->assertArrayHasKey($key, $map);
         return $map[$key]['scope'] === $scope ? $map[$key]['value'] : null;
     }));
     $this->assertSame($map[Price::XML_PATH_RANGE_CALCULATION]['value'], $this->target->getRangeCalculationValue());
     $this->assertSame($map[Price::XML_PATH_RANGE_STEP]['value'], $this->target->getRangeStepValue());
     $this->assertSame($map[Price::XML_PATH_ONE_PRICE_INTERVAL]['value'], $this->target->getOnePriceIntervalValue());
     $this->assertSame($map[Price::XML_PATH_INTERVAL_DIVISION_LIMIT]['value'], $this->target->getIntervalDivisionLimitValue());
     $this->assertSame($map[Price::XML_PATH_RANGE_MAX_INTERVALS]['value'], $this->target->getRangeMaxIntervalsValue());
 }