setRecipeName("Recipe 1"); $recipe1->addIngredient($ingredientA); $recipe1->addIngredient($ingredientB); $percent1 = 5; $recipe2 = new Recipe(); $recipe2->setRecipeName("Recipe 2"); $recipe2->addIngredient($ingredientB); $recipe2->addIngredient($ingredientC); $percent2 = 7; $base1 = new Base("VG70"); $base2 = new Base("VG50"); $ml1 = 60; $ml2 = 30; $g1_1 = 0; $g1_2 = 0; $g2_1 = 0; $g2_2 = 0; return [ [ $recipe1, $base1, $percent1, $ml1, $g1_1 ], [ $recipe1, $base2, $percent1, $ml1, $g1_2 ], [ $recipe2, $base1, $percent2, $ml2, $g2_1 ], [ $recipe2, $base2, $percent2, $ml2, $g2_2 ], ]; } /** * @dataProvider getValuesForPropertyTest */ public function testCalculatedPropertiesOfMixedRecipe(Recipe $recipe, $base, $expectedPercent, $expectedMl, $expectedG) { $mixer = new Mixer(); $mixed = $mixer->mixRecipe($recipe, $expectedMl, $base, 0, null); $this->assertEquals($expectedMl, $mixed->getVolume()); $this->assertEquals($expectedPercent, $mixed->getTotalFlavorPercent()); } }