Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.

Commit

Permalink
Update config use in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wimski committed May 5, 2021
1 parent 1a9344a commit 3e349b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions tests/TrixDriverUploadTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

namespace Froala\NovaFroalaField\Tests;

use function Froala\NovaFroalaField\nova_version_at_least;
use Froala\NovaFroalaField\Tests\Fixtures\Article;
use Froala\NovaFroalaField\Tests\Fixtures\TestServiceProvider;
use function Froala\NovaFroalaField\nova_version_at_least;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\Storage;
use Laravel\Nova\Trix\Attachment;
Expand All @@ -26,11 +25,9 @@ public function setUp(): void

protected function getPackageProviders($app)
{
$providers = parent::getPackageProviders($app);

array_unshift($providers, TestServiceProvider::class);
$app['config']->set('nova.froala-field.attachments_driver', 'trix');

return $providers;
return parent::getPackageProviders($app);
}

/** @test */
Expand Down
2 changes: 1 addition & 1 deletion tests/UploadsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected function regenerateUpload()

protected function uploadPendingFile(): TestResponse
{
$url = config('nova.froala-field.attachments_driver') === 'trix'
$url = $this->app['config']->get('nova.froala-field.attachments_driver') === 'trix'
? '/nova-api/articles/trix-attachment/content'
: 'nova-vendor/froala-field/articles/attachments/content';

Expand Down

0 comments on commit 3e349b9

Please sign in to comment.