Expand binder test.

This commit is contained in:
James Cole
2017-12-25 15:30:50 +01:00
parent 58eaf3bccc
commit 01818af963
6 changed files with 411 additions and 40 deletions

View File

@@ -25,6 +25,7 @@ namespace FireflyIII\Support\Binder;
use Carbon\Carbon;
use Exception;
use FireflyIII\Helpers\FiscalHelper;
use FireflyIII\Helpers\FiscalHelperInterface;
use Illuminate\Routing\Route;
use Log;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
@@ -42,7 +43,8 @@ class Date implements BinderInterface
*/
public static function routeBinder(string $value, Route $route): Carbon
{
$fiscalHelper = new FiscalHelper;
/** @var FiscalHelperInterface $fiscalHelper */
$fiscalHelper = app(FiscalHelperInterface::class);
switch ($value) {
default: