mixRecipe($recipe, 10, $base, 0); $this->assertCount(1, $mixed); $mixedVg = reset($mixed); $this->assertEquals(10, $mixedVg->getVolume()); $this->assertEquals("VG", $mixedVg->getFlavorName()); } public function testMixingEmptyRecipesWithPg() { $recipe = new Recipe(); $mixer = new Mixer(); $base = new Base("PG100"); $mixed = $mixer->mixRecipe($recipe, 10, $base, 0); $this->assertCount(1, $mixed); $mixedPg = reset($mixed); $this->assertEquals(10, $mixedPg->getVolume()); $this->assertEquals("PG", $mixedPg->getFlavorName()); } public function testMixingEmptyRecipesWith70Vg30Pg() { $recipe = new Recipe(); $mixer = new Mixer(); $base = new Base("VG70"); $mixed = $mixer->mixRecipe($recipe, 10, $base, 0); $this->assertCount(2, $mixed); $mixedVg = array_shift($mixed); $this->assertEquals(10, $mixedVg->getVolume()); $this->assertEquals("VG", $mixedVg->getFlavorName()); $mixedPg = array_shift($mixed); $this->assertEquals(10, $mixedPg->getVolume()); $this->assertEquals("PG", $mixedPg->getFlavorName()); } }