mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
17 lines
362 B
PHP
17 lines
362 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Traits\Macroable;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
uses(Macroable::class);
|
|
|
|
beforeEach()->macro('bar', function () {
|
|
expect($this)->toBeInstanceOf(TestCase::class);
|
|
});
|
|
|
|
it('can call chained macro method')->bar();
|
|
|
|
it('will throw exception from call if no macro exists')
|
|
->throws(BadMethodCallException::class)
|
|
->foo();
|