Beispiel #1
0
 public function testIngredientWhenValid()
 {
     $item = 'butter';
     $amount = 1;
     $unit = 'slices';
     $usedBy = new DateTime('+30 day');
     $ingredient = new Ingredient($item, $amount, $unit, $usedBy);
     $this->assertEquals($ingredient->getItem(), $item);
     $this->assertEquals($ingredient->getAmount(), $amount);
     $this->assertEquals($ingredient->getUnit(), $unit);
     $this->assertEquals($ingredient->getUsedBy(), $usedBy);
     $this->assertEquals($ingredient->hasExpired(), false);
 }