/** * @return void */ public function testQueryValueConstraintsForValueUsage() { $result = $this->facade->getValueConstraintsForValueUsage($this->ids['idUsageGreen']); $this->assertCount(2, $result); $this->assertEquals('ALLOW', $result[0]['operator']); $this->assertEquals($this->ids['idUsageSmall'], $result[1]['valueUsageId']); $this->assertEquals('ALLOW', $result[1]['operator']); $this->assertEquals($this->ids['idUsageLarge'], $result[0]['valueUsageId']); $result = $this->facade->getValueConstraintsForValueUsage($this->ids['idUsageBlue']); $this->assertCount(1, $result); $this->assertEquals('NOT', $result[0]['operator']); $this->assertEquals($this->ids['idUsageSmall'], $result[0]['valueUsageId']); $result = $this->facade->getValueConstraintsForValueUsage($this->ids['idUsageMedium']); $this->assertCount(1, $result); $this->assertEquals('ALWAYS', $result[0]['operator']); $this->assertEquals($this->ids['idUsageRed'], $result[0]['valueUsageId']); }
/** * @param int $idValueUsage * * @return array */ public function getValueConstraintsForValueUsage($idValueUsage) { return $this->productOptionFacade->getValueConstraintsForValueUsage($idValueUsage); }