Initial checkin
This commit is contained in:
28
tests/Recipe/RecipeTest.php
Normal file
28
tests/Recipe/RecipeTest.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace NoccyLabs\Juicer\Recipe;
|
||||
|
||||
use NoccyLabs\Juicer\Ingredient\Ingredient;
|
||||
|
||||
class RecipeTest extends \PhpUnit\Framework\TestCase
|
||||
{
|
||||
|
||||
public function testCreatingAndModifyingRecipes()
|
||||
{
|
||||
$recipe = new Recipe();
|
||||
$recipe->setRecipeName("foo");
|
||||
$recipe->setRecipeAuthor("bar");
|
||||
|
||||
$ingredient1 = new Ingredient("Ingredient 1");
|
||||
$ingredient2 = new Ingredient("Ingredient 2");
|
||||
|
||||
$recipe->addIngredient($ingredient1);
|
||||
$recipe->addIngredient($ingredient2);
|
||||
|
||||
$this->assertInstanceOf(Recipe::class, $recipe);
|
||||
$this->assertEquals("foo", $recipe->getRecipeName());
|
||||
$this->assertEquals("bar", $recipe->getRecipeAuthor());
|
||||
$this->assertEquals([$ingredient1, $ingredient2], $recipe->getIngredients());
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user