1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace Hawese\Tests;
- use Laravel\Lumen\Testing\TestCase as BaseTestCase;
- abstract class TestCase extends BaseTestCase
- {
- public function createApplication()
- {
- return require 'bootstrap/app.php';
- }
-
- protected static function schema()
- {
- return app('db')->connection()->getSchemaBuilder();
- }
-
- public function request(
- $method,
- $uri,
- array $data = [],
- array $headers = []
- ) {
- $this->json($method, $uri, $data, $headers);
- return $this->response;
- }
- protected function validOrigin()
- {
- return preg_split('/, ?/', env('CORS_ALLOW_ORIGINS'))[0];
- }
- }
|