Nestable\Tests\MacrosTraitTest::testMacro PHP Method

testMacro() public method

public testMacro ( )
    public function testMacro()
    {
        $nestable = new \Nestable\Services\NestableService();
        $nested = $nestable->make($this->categories);
        $nested->macro('test', function () {
            return 'Nestable';
        });
        $this->assertTrue($nested->hasMacro('test'));
    }