7 changed files with 79 additions and 4 deletions
-
3composer.json
-
21src/CrudMake.php
-
21src/stubs/test-browserkit-base-class.stub
-
2src/stubs/test-feature.stub
-
33tests/Generators/FeatureTestGeneratorTest.php
-
2tests/Generators/RouteWebGeneratorTest.php
-
1tests/TestCase.php
@ -0,0 +1,21 @@ |
|||
<?php |
|||
|
|||
namespace Tests; |
|||
|
|||
use App\User; |
|||
use Laravel\BrowserKitTesting\TestCase as BaseTestCase; |
|||
|
|||
abstract class BrowserKitTestCase extends BaseTestCase |
|||
{ |
|||
use CreatesApplication; |
|||
|
|||
protected $baseUrl = 'http://localhost'; |
|||
|
|||
protected function loginAsUser() |
|||
{ |
|||
$user = factory(User::class)->create(); |
|||
$this->actingAs($user); |
|||
|
|||
return $user; |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue