From 53a8c7b05e2050e9b8c49c0d99a1dce74348596b Mon Sep 17 00:00:00 2001 From: Tom Witkowski Date: Sun, 21 Jun 2020 14:02:56 +0200 Subject: [PATCH] add test for new macro behavior --- tests/.snapshots/success.txt | 7 +++++-- tests/Features/Macro.php | 12 ++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 tests/Features/Macro.php diff --git a/tests/.snapshots/success.txt b/tests/.snapshots/success.txt index 1671b70b..6c2d741e 100644 --- a/tests/.snapshots/success.txt +++ b/tests/.snapshots/success.txt @@ -67,6 +67,9 @@ ✓ it is a test ✓ it is a higher order message test + PASS Tests\Features\Macro + ✓ it can call chained macro method + PASS Tests\Features\Mocks ✓ it has bar @@ -151,5 +154,5 @@ WARN Tests\Visual\Success s visual snapshot of test suite on success - Tests: 6 skipped, 86 passed - Time: 3.58s + Tests: 6 skipped, 87 passed + Time: 3.60s diff --git a/tests/Features/Macro.php b/tests/Features/Macro.php new file mode 100644 index 00000000..7ba8c127 --- /dev/null +++ b/tests/Features/Macro.php @@ -0,0 +1,12 @@ +macro('bar', function () { + assertInstanceOf(TestCase::class, $this); + + return $this; +})->bar();