Multiple changes and improvements

* Base and NicotineBase separated
* Importer bugfixed
* Mixer improved
This commit is contained in:
2019-07-09 02:10:56 +02:00
parent 6e662f0263
commit 922d9f09dd
14 changed files with 302 additions and 44 deletions

View File

@ -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());
}
}