public function testRunMacro() { $nestable = new \Nestable\Services\NestableService(); $nested = $nestable->make($this->categories); $nested->macro('test', function () { return 'Nestable'; }); $this->assertEquals('Nestable', $nested->test()); }
public function testIsValidForMultiple() { $nestable = new \Nestable\Services\NestableService(); $nested = $nestable->make($this->categories); $this->assertTrue($nested->isValidForMultiple()); $this->assertRegExp('/' . $this->_get_pattern('multiple') . '/', $nested->isValidForMultiple(true)); }