diff --git a/More/EAV/Tests/AttributeTest.php b/More/EAV/Tests/AttributeTest.php index 1561acd..c95cdad 100644 --- a/More/EAV/Tests/AttributeTest.php +++ b/More/EAV/Tests/AttributeTest.php @@ -42,9 +42,6 @@ class AttributeTest extends \PHPUnit_Framework_TestCase $colorGold = new Value($attribute); $colorGold->setName('Gold'); $values[] = $colorGold; - $colorSpaceGrey = new Value($attribute); - $colorSpaceGrey->setName('Space Grey'); - $values[] = $colorSpaceGrey; $this->assertEquals($values, $attribute->getValues()); } @@ -65,13 +62,9 @@ class AttributeTest extends \PHPUnit_Framework_TestCase $colorGold = new Value($attribute); $colorGold->setName('Gold'); $values[] = $colorGold; - $colorSpaceGrey = new Value($attribute); - $colorSpaceGrey->setName('Space Grey'); - $values[] = $colorSpaceGrey; - $randomIndex = array_rand($values); - $attribute->removeValue($values[$randomIndex]); - unset($values[$randomIndex]); + $attribute->removeValue($values[0]); + unset($values[0]); $this->assertEquals($values, $attribute->getValues()); } diff --git a/More/EAV/Tests/EntityTest.php b/More/EAV/Tests/EntityTest.php index ecbd3a2..bb88c0f 100644 --- a/More/EAV/Tests/EntityTest.php +++ b/More/EAV/Tests/EntityTest.php @@ -58,9 +58,8 @@ class EntityTest extends \PHPUnit_Framework_TestCase $macBook->addValue($value); } - $randomIndex = array_rand($values); - $macBook->removeValue($values[$randomIndex]); - unset($values[$randomIndex]); + $macBook->removeValue($values[0]); + unset($values[0]); $this->assertEquals($values, $macBook->getValues()); }