Skip to content

Commit

Permalink
Use mockery to create Dispatcher dummy
Browse files Browse the repository at this point in the history
API for the Dispatcher changed once, that's enough to convince me to
stop keeping it up to date manually.
  • Loading branch information
adamwathan committed Jun 17, 2015
1 parent 4d7788d commit ec048ef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"illuminate/container": "~5.0",
"illuminate/support": "~5.0",
"illuminate/view": "~5.0",
"symfony/console": "~2.5"
"symfony/console": "~2.5",
"mockery/mockery": "^0.9.4"
},
"bin": [
"jigsaw"
Expand Down
3 changes: 1 addition & 2 deletions jigsaw
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use Jigsaw\Jigsaw\Console\InitCommand;
use Jigsaw\Jigsaw\Handlers\BladeHandler;
use Jigsaw\Jigsaw\Handlers\DefaultHandler;
use Jigsaw\Jigsaw\Jigsaw;
use Jigsaw\Jigsaw\NullDispatcher;

if (file_exists(__DIR__.'/vendor/autoload.php')) {
require __DIR__.'/vendor/autoload.php';
Expand All @@ -38,7 +37,7 @@ $container->bind(BladeHandler::class, function ($c) use ($cachePath, $sourcePath
});

$finder = new FileViewFinder(new Filesystem, [$sourcePath]);
$factory = new Factory($resolver, $finder, new NullDispatcher);
$factory = new Factory($resolver, $finder, Mockery::mock(Dispatcher::class)->shouldIgnoreMissing());

return new BladeHandler($factory);
});
Expand Down
14 changes: 0 additions & 14 deletions src/NullDispatcher.php

This file was deleted.

0 comments on commit ec048ef

Please sign in to comment.