Multiple changes and improvements
* Base and NicotineBase separated * Importer bugfixed * Mixer improved
This commit is contained in:
		@@ -5,6 +5,7 @@ namespace NoccyLabs\Juicer\Recipe\Importer;
 | 
			
		||||
use NoccyLabs\Juicer\Recipe\Recipe;
 | 
			
		||||
use NoccyLabs\Juicer\Ingredient\Ingredient;
 | 
			
		||||
use NoccyLabs\Juicer\Recipe\Exporter\JsonExporter;
 | 
			
		||||
use NoccyLabs\Juicer\Recipe\RecipeInterface;
 | 
			
		||||
 | 
			
		||||
class JsonImporterTest extends \PhpUnit\Framework\TestCase
 | 
			
		||||
{
 | 
			
		||||
@@ -41,5 +42,14 @@ class JsonImporterTest extends \PhpUnit\Framework\TestCase
 | 
			
		||||
        $this->assertEquals($recipe, $importedRecipe);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function testThatRecipesCanBeImportedFromFile()
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        $importer = new JsonImporter();
 | 
			
		||||
        $importedRecipe = $importer->readFromFile(__DIR__."/../../data/recipe1.json");
 | 
			
		||||
 | 
			
		||||
        $this->assertInstanceOf(RecipeInterface::class, $importedRecipe);
 | 
			
		||||
        $this->assertEquals("Recipe 1", $importedRecipe->getRecipeName());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user