function testDontBreakIfRecipeNotExist() { $recipe = new Recipe(rand(-1, 5)); $this->assertTrue(!empty($recipe->name())); $this->assertTrue(!empty($recipe->imageUrl())); }
function testIfRecipeExists() { $recipe = new Recipe(rand(-1, 5)); $this->assertTrue(!empty($recipe->name())); $this->assertTrue(!empty($recipe->imageUrl())); }
</table> <?php } else { echo "<p>Sorry, you don't currently have any starred recipes, get started by starring recipes you like</p>"; } ?> </div> </div> </div> <div class="col-xs-12 col-sm-12 col-md-8"> <div class="thumbnail"> <?php if ($recipe->exists()) { ?> <img id="recipe-photo" src="<?php echo "images/recipes/" . $recipe->imageUrl(); ?> " title="<?php echo $recipe->name(); ?> photo" alt="<?php echo $recipe->name(); ?> photo"> <?php } ?> <div class="caption"> <h1><?php echo $recipe->name();