123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- // Copyright 2019 Hackware SpA <human@hackware.cl>
- // "Hackware Web Services Core" is released under the MIT License terms.
- namespace Hawese\Tests;
- // use PHPUnit\Framework\TestCase as BaseTestCase; // Eventually
- use Laravel\Lumen\Testing\TestCase as BaseTestCase;
- abstract class TestCase extends BaseTestCase
- {
- public function createApplication()
- {
- return require 'bootstrap/app.php';
- }
- /**
- * Access to database schema builder without Schema facade
- */
- protected static function schema()
- {
- return app('db')->connection()->getSchemaBuilder();
- }
- /**
- * I don't want it fluent.
- */
- public function request(
- $method,
- $uri,
- array $data = [],
- array $headers = []
- ) {
- $this->json($method, $uri, $data, $headers);
- return $this->response;
- }
- }
|