Skip to content

Commit 47bfbe1

Browse files
committed
Fixed error when workbench directory doesn't exist
1 parent 0a3a1c5 commit 47bfbe1

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

app/tests/TestCase.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,17 @@ public function createApplication()
1313

1414
$testEnvironment = 'testing';
1515

16-
$basePath = __DIR__.'/../..';
16+
$this->startWorkbench();
1717

18-
Illuminate\Workbench\Starter::start($basePath.'/workbench');
18+
return require __DIR__.'/../../start.php';
19+
}
1920

20-
return require $basePath.'/start.php';
21+
public function startWorkbench()
22+
{
23+
if (is_dir($workbench = __DIR__.'/../../workbench'))
24+
{
25+
Illuminate\Workbench\Starter::start($workbench);
26+
}
2127
}
2228

2329
}

0 commit comments

Comments
 (0)