Fix Calc
This commit is contained in:
parent
a9b3a17518
commit
9a8aec0619
@ -33,19 +33,6 @@ class Valid
|
|||||||
/** @var Base $option */
|
/** @var Base $option */
|
||||||
foreach($this->article->getOptions() as $option) {
|
foreach($this->article->getOptions() as $option) {
|
||||||
|
|
||||||
if(count($option->getEdgesCollectionContainer()) > 0) {
|
|
||||||
$option->setIsValid(false);
|
|
||||||
}
|
|
||||||
/** @var EdgeCollection $collection */
|
|
||||||
foreach($option->getEdgesCollectionContainer() as $collection) {
|
|
||||||
/** @var Edge $edge */
|
|
||||||
foreach($collection as $edge) {
|
|
||||||
if($this->edgeIsValid($collection->getName(), $edge)) {
|
|
||||||
$option->setIsValid(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if($option instanceof Select) {
|
if($option instanceof Select) {
|
||||||
|
|
||||||
$valid = false;
|
$valid = false;
|
||||||
@ -77,6 +64,21 @@ class Valid
|
|||||||
$option->setIsValid($valid);
|
$option->setIsValid($valid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(count($option->getEdgesCollectionContainer()) > 0) {
|
||||||
|
$option->setIsValid(false);
|
||||||
|
}
|
||||||
|
/** @var EdgeCollection $collection */
|
||||||
|
foreach($option->getEdgesCollectionContainer() as $collection) {
|
||||||
|
/** @var Edge $edge */
|
||||||
|
foreach($collection as $edge) {
|
||||||
|
if($this->edgeIsValid($collection->getName(), $edge)) {
|
||||||
|
$option->setIsValid(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,9 +35,9 @@ class selectWithGrenzenTest extends \PHPUnit_Framework_TestCase
|
|||||||
/** @var Article $article */
|
/** @var Article $article */
|
||||||
$article = $this->engine->getArticle();
|
$article = $this->engine->getArticle();
|
||||||
|
|
||||||
$this->assertCount(3, $article->getValidOptions());
|
$this->assertCount(2, $article->getValidOptions());
|
||||||
|
|
||||||
$this->assertCount(3, $article->getOptionsAsArray());
|
$this->assertCount(2, $article->getOptionsAsArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSelectWithGrenzenParams()
|
public function testSelectWithGrenzenParams()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user