/**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     $this->app->bind('fixturize.writer', function ($app, $name) {
         $fixturize = new Writer(new Filesystem());
         $path = Config::get('fixturizer.fixture_storage_folder');
         $fixturize->setDestination($path . '/');
         $fixturize->setYmlParser(new Yaml());
         return $fixturize;
     });
     $this->app->bind('fixturize.reader', function ($app) {
         $fixturize = new Reader(new Filesystem());
         $fixturize->setYmlParser(new Yaml());
         return $fixturize;
     });
     $this->publishes([__DIR__ . '/../config/config.php', config_path('fixturizer.php')]);
 }
 /**
  * @expectedException \AlfredNutileInc\Fixturizer\MissingFileException
  * @test
  */
 public function should_fail_can_not_write_to_folder()
 {
     $this->setUpFixtureYml();
     $fixturizer = new Writer();
     $path = __DIR__ . "/foobarland/foo.yml";
     $fixturizer->setDestination($path)->setName('foo.yml');
     $fixture = $this->getFixtureSampleArray();
     $fixturizer->createFixture($fixture);
     $this->assertFileExists($fixturizer->getDestination() . 'foo.yml');
 }