Inheritance: extends AbstractCommand, implements WebHookInterface
Example #1
0
 public function it_does_not_strip_multiple_occurrences(WebHook $command)
 {
     $command->offsetGet('channel_id')->willReturn('C98765');
     $command->offsetGet('channel_name')->willReturn('group');
     $command->offsetGet('user_id')->willReturn('U12345');
     $command->offsetGet('user_name')->willReturn('crumm');
     $command->offsetGet('command')->willReturn('foo:');
     $command->offsetGet('text')->willReturn('foo: bar foo: bat foo baz foo: you');
     $this->execute($command)['text']->shouldReturn('<@U12345|crumm> bar foo: bat foo baz foo: you');
 }
Example #2
0
 public function it_matches_a_WebHook_by_name(WebHook $command)
 {
     $command->get('command')->willReturn('foo:');
     $this->setCommandName('foo:')->matches($command)->shouldReturn(true);
 }