public function test_it_can_use_custom_decorator() { $decorator = new DecoratorFactory(); $decorator->register('trim', function ($value) { return trim($value); }); $this->assertEquals('hello', $decorator->decorate('trim', ' hello ')); }
public function test_it_can_use_custom_decorator() { $decorator = new DecoratorFactory(); $decorator->register('trim', function ($value) { return trim($value); }); $this->assertEquals('hello', $decorator->decorate('trim', ' hello ')); }