mirror of
https://github.com/pestphp/pest.git
synced 2026-03-12 02:37:22 +01:00
add test for new macro behavior
This commit is contained in:
@ -67,6 +67,9 @@
|
|||||||
✓ it is a test
|
✓ it is a test
|
||||||
✓ it is a higher order message test
|
✓ it is a higher order message test
|
||||||
|
|
||||||
|
PASS Tests\Features\Macro
|
||||||
|
✓ it can call chained macro method
|
||||||
|
|
||||||
PASS Tests\Features\Mocks
|
PASS Tests\Features\Mocks
|
||||||
✓ it has bar
|
✓ it has bar
|
||||||
|
|
||||||
@ -151,5 +154,5 @@
|
|||||||
WARN Tests\Visual\Success
|
WARN Tests\Visual\Success
|
||||||
s visual snapshot of test suite on success
|
s visual snapshot of test suite on success
|
||||||
|
|
||||||
Tests: 6 skipped, 86 passed
|
Tests: 6 skipped, 87 passed
|
||||||
Time: 3.58s
|
Time: 3.60s
|
||||||
|
|||||||
12
tests/Features/Macro.php
Normal file
12
tests/Features/Macro.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Traits\Macroable;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
uses(Macroable::class);
|
||||||
|
|
||||||
|
it('can call chained macro method')->macro('bar', function () {
|
||||||
|
assertInstanceOf(TestCase::class, $this);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
})->bar();
|
||||||
Reference in New Issue
Block a user