Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Jun 24, 2021
1 parent 9d338a1 commit 99ed7a7
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/Feature/ObserveEloquentTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace NovaKit\Tests\Feature;

use Illuminate\Foundation\Auth\User;
use Illuminate\Support\Facades\Event;
use Laravel\Octane\Events\RequestReceived;
use function NovaKit\observe_eloquent;
use Orchestra\Testbench\TestCase;

class ObserveEloquentTest extends TestCase
{
/** @test */
public function it_can_observe_eloquent()
{
Event::fake();

observe_eloquent(User::class, new class {

});

$this->assertTrue(Event::hasListeners(
RequestReceived::class,
));
}
}

class UserObserver {
public function created($model) {

}
}

0 comments on commit 99ed7a7

Please sign in to comment.