macro('bar', function () { assertInstanceOf(TestCase::class, $this); return $this; }); }); it('can call chained macro method')->bar(); it('will throw exception from call if no macro exists') ->throws(BadMethodCallException::class) ->foo();