Skip to content

Commit

Permalink
update unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
Gummibeer committed Oct 14, 2019
1 parent 24703cf commit c275fe0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/Models/PageTest.php
Expand Up @@ -202,14 +202,15 @@ public function it_returns_feed_item_if_page_data_supports_it(): void
public function it_is_macroable()
{
$called = false;
$callback = function () use (&$called) {

Page::macro('testMacro', function () use (&$called) {
$called = true;
};

Page::macro('testMacro', $callback);
Page::testMacro();
return $called;
});

static::assertTrue(Page::hasMacro('testMacro'));
static::assertTrue(Page::testMacro());
static::assertTrue($called);
}
}

0 comments on commit c275fe0

Please sign in to comment.