<?php namespace Spatie\LaravelIgnition\Tests; use Illuminate\Foundation\Testing\Concerns\MakesHttpRequests; use Illuminate\Http\Request; use Spatie\FlareClient\Glows\Glow; use Spatie\FlareClient\Report; use Spatie\LaravelIgnition\Facades\Flare; use Spatie\LaravelIgnition\IgnitionServiceProvider; use Spatie\LaravelIgnition\Tests\TestClasses\FakeTime; use Symfony\Component\HttpFoundation\Request as SymfonyRequest; class TestCase extends \Orchestra\Testbench\TestCase { use MakesHttpRequests; protected $fakeClient = null; protected function setUp(): void { ray()->newScreen($this->getName()); parent::setUp(); } protected function getPackageProviders($app) { config()->set('flare.key', 'dummy-key'); return [IgnitionServiceProvider::class]; } protected function getPackageAliases($app) { return [ 'Flare' => Flare::class, ]; } public function useTime(string $dateTime, string $format = 'Y-m-d H:i:s') { $fakeTime = new FakeTime($dateTime, $format); Report::useTime($fakeTime); Glow::useTime($fakeTime); } public function createRequest($method, $uri, $parameters = [], $cookies = [], $files = [], $server = [], $content = null): Request { $files = array_merge($files, $this->extractFilesFromDataArray($parameters)); $symfonyRequest = SymfonyRequest::create( $this->prepareUrlForRequest($uri), $method, $parameters, $cookies, $files, array_replace($this->serverVariables, $server), $content ); return Request::createFromBase($symfonyRequest); } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Commands | Folder | 0755 |
|
|
Context | Folder | 0755 |
|
|
ContextProviders | Folder | 0755 |
|
|
Exceptions | Folder | 0755 |
|
|
FlareMiddleware | Folder | 0755 |
|
|
Http | Folder | 0755 |
|
|
LogRecorder | Folder | 0755 |
|
|
Mocks | Folder | 0755 |
|
|
QueryRecorder | Folder | 0755 |
|
|
Recorders | Folder | 0755 |
|
|
Solutions | Folder | 0755 |
|
|
Support | Folder | 0755 |
|
|
TestClasses | Folder | 0755 |
|
|
Views | Folder | 0755 |
|
|
stubs | Folder | 0755 |
|
|
ErrorPageViewModelTest.php | File | 665 B | 0644 |
|
ExceptionSolutionTest.php | File | 3.07 KB | 0644 |
|
FlareTest.php | File | 956 B | 0644 |
|
HelpersTest.php | File | 103 B | 0644 |
|
IgnitionConfigTest.php | File | 1.39 KB | 0644 |
|
LogTest.php | File | 4.29 KB | 0644 |
|
Pest.php | File | 92 B | 0644 |
|
RenderIgnitionPageTest.php | File | 915 B | 0644 |
|
TestCase.php | File | 1.75 KB | 0644 |
|