Don't run events

parent 64f7e413
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace Modules\Menu\Tests; namespace Modules\Menu\Tests;
use Illuminate\Support\Facades\Event;
use Modules\Menu\Services\MenuItemUriGenerator; use Modules\Menu\Services\MenuItemUriGenerator;
use Modules\Page\Repositories\PageRepository; use Modules\Page\Repositories\PageRepository;
...@@ -42,6 +43,7 @@ class MenuItemUriGeneratorTest extends BaseMenuTest ...@@ -42,6 +43,7 @@ class MenuItemUriGeneratorTest extends BaseMenuTest
/** @test */ /** @test */
public function it_generates_uri_with_the_parents_slug() public function it_generates_uri_with_the_parents_slug()
{ {
Event::fake();
$this->page->create([ $this->page->create([
'is_home' => 1, 'is_home' => 1,
'template' => 'default', 'template' => 'default',
...@@ -80,6 +82,7 @@ class MenuItemUriGeneratorTest extends BaseMenuTest ...@@ -80,6 +82,7 @@ class MenuItemUriGeneratorTest extends BaseMenuTest
/** @test */ /** @test */
public function it_generates_uri_with_multiple_parents() public function it_generates_uri_with_multiple_parents()
{ {
Event::fake();
$this->page->create([ $this->page->create([
'is_home' => 1, 'is_home' => 1,
'template' => 'default', 'template' => 'default',
...@@ -140,6 +143,7 @@ class MenuItemUriGeneratorTest extends BaseMenuTest ...@@ -140,6 +143,7 @@ class MenuItemUriGeneratorTest extends BaseMenuTest
/** @test */ /** @test */
public function it_generates_a_uri_if_parent_isnt_a_page() public function it_generates_a_uri_if_parent_isnt_a_page()
{ {
Event::fake();
$this->page->create([ $this->page->create([
'is_home' => 0, 'is_home' => 0,
'template' => 'default', 'template' => 'default',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment