init
Tests / metadata (push) Canceled after 0s
Tests / nova-credentials (push) Canceled after 0s
Tests / PHP 8.2 (push) Canceled after 0s
Tests / PHP 8.3 (push) Canceled after 0s
Tests / PHP 8.4 (push) Canceled after 0s
Tests / PHP 8.5 (push) Canceled after 0s
Tests / metadata (push) Canceled after 0s
Tests / nova-credentials (push) Canceled after 0s
Tests / PHP 8.2 (push) Canceled after 0s
Tests / PHP 8.3 (push) Canceled after 0s
Tests / PHP 8.4 (push) Canceled after 0s
Tests / PHP 8.5 (push) Canceled after 0s
This commit is contained in:
19 files changed
+1102
No files matched your search
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace MeghdadFadaee\NovaFormDock\Tests;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Laravel\Nova\Events\ServingNova;
|
||||
use Laravel\Nova\Nova;
|
||||
|
||||
class AssetRegistrationTest extends TestCase
|
||||
{
|
||||
public function test_it_registers_its_nova_assets_and_frontend_configuration(): void
|
||||
{
|
||||
event(new ServingNova($this->app, Request::create('/nova')));
|
||||
|
||||
$style = collect(Nova::allStyles())
|
||||
->first(fn ($asset): bool => $asset->name() === 'nova-form-dock');
|
||||
$script = collect(Nova::allScripts())
|
||||
->first(fn ($asset): bool => $asset->name() === 'nova-form-dock');
|
||||
|
||||
$this->assertNotNull($style);
|
||||
$this->assertNotNull($script);
|
||||
$this->assertFileExists($style->path());
|
||||
$this->assertFileExists($script->path());
|
||||
$this->assertSame(
|
||||
'automatic',
|
||||
Nova::jsonVariables(Request::create('/nova'))['novaFormDock']['mode'],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user