Skip to content

Commit

Permalink
Tests passing after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
MortenDHansen committed Dec 15, 2023
1 parent 6473980 commit ea63b50
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/Concerns/GathersDataToAudit.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ protected function getAuditAttributes(): array
protected function isAttributeAuditable(string $attribute): bool
{
// The attribute should not be audited
if (in_array($attribute, $this->excludedAttributes, true)) {
if (in_array($attribute, $this->resolvedExcludedAttributes, true)) {
return false;
}

Expand Down
16 changes: 8 additions & 8 deletions tests/Functional/AuditingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -642,9 +642,9 @@ public function itWillAuditSync()
*/
public function itWillAuditDetach()
{
$firstCategory = factory(Category::class)->create();
$secondCategory = factory(Category::class)->create();
$article = factory(Article::class)->create();
$firstCategory = Category::factory()->create();
$secondCategory = Category::factory()->create();
$article = Article::factory()->create();

$article->categories()->attach($firstCategory);
$article->categories()->attach($secondCategory);
Expand Down Expand Up @@ -754,8 +754,8 @@ public function itWillNotAuditAttachWhenSkippingEmptyValuesAndNoChangesMade()
{
$this->app['config']->set('audit.empty_values', false);

$firstCategory = factory(Category::class)->create();
$article = factory(Article::class)->create();
$firstCategory = Category::factory()->create();
$article = Article::factory()->create();

$article->categories()->attach($firstCategory);

Expand All @@ -781,9 +781,9 @@ public function itWillNotAuditDetachWhenSkippingEmptyValuesAndNoChangesMade()
{
$this->app['config']->set('audit.empty_values', false);

$firstCategory = factory(Category::class)->create();
$secondCategory = factory(Category::class)->create();
$article = factory(Article::class)->create();
$firstCategory = Category::factory()->create();
$secondCategory = Category::factory()->create();
$article = Article::factory()->create();

$article->categories()->attach($firstCategory);

Expand Down
10 changes: 5 additions & 5 deletions tests/Unit/AuditableObserverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace OwenIt\Auditing\Tests\Unit;

use OwenIt\Auditing\Models\Audit;
use Illuminate\Support\Facades\Event;
use OwenIt\Auditing\AuditableObserver;
use OwenIt\Auditing\Tests\AuditingTestCase;
use OwenIt\Auditing\Tests\Models\Article;
use OwenIt\Auditing\Events\DispatchAudit;
use OwenIt\Auditing\Events\DispatchingAudit;
use OwenIt\Auditing\Models\Audit;
use OwenIt\Auditing\Tests\AuditingTestCase;
use OwenIt\Auditing\Tests\Models\Article;

class AuditableObserverTest extends AuditingTestCase
{
Expand All @@ -30,7 +30,7 @@ public function itWillCancelTheAuditDispatchingFromAnEventListener($eventMethod)
});

$observer = new AuditableObserver();
$model = factory(Article::class)->create();
$model = Article::factory()->create();

$observer->$eventMethod($model);

Expand All @@ -49,7 +49,7 @@ public function itDispatchesTheCorrectEvents(string $eventMethod)
Event::fake();

$observer = new AuditableObserver();
$model = factory(Article::class)->create();
$model = Article::factory()->create();

$observer->$eventMethod($model);

Expand Down
10 changes: 5 additions & 5 deletions tests/Unit/ProcessDispatchAuditTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace OwenIt\Auditing\Tests\Unit;

use Illuminate\Events\CallQueuedListener;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Queue;
use OwenIt\Auditing\Events\DispatchAudit;
use OwenIt\Auditing\Tests\Models\Article;
use Illuminate\Events\CallQueuedListener;
use OwenIt\Auditing\Tests\AuditingTestCase;
use OwenIt\Auditing\Listeners\ProcessDispatchAudit;
use OwenIt\Auditing\Tests\AuditingTestCase;
use OwenIt\Auditing\Tests\Models\Article;

class ProcessDispatchAuditTest extends AuditingTestCase
{
Expand Down Expand Up @@ -36,7 +36,7 @@ public function itGetsProperlyQueued()
{
Queue::fake();

$model = factory(Article::class)->create();
$model = Article::factory()->create();

DispatchAudit::dispatch($model);

Expand All @@ -58,7 +58,7 @@ public function itCanHaveConnectionAndQueueSet()

Queue::fake();

$model = factory(Article::class)->create();
$model = Article::factory()->create();

DispatchAudit::dispatch($model);

Expand Down

0 comments on commit ea63b50

Please sign in to comment.