public function it_replies_to_carol(CommandInterface $command) { $command->offsetGet('channel_id')->willReturn('C98765'); $command->offsetGet('channel_name')->willReturn('group'); $command->offsetGet('user_id')->willReturn('U12346'); $command->offsetGet('user_name')->willReturn('carol'); $this->reply($command, 'I got your message.')['text']->shouldReturn('<@U12346|carol> I got your message.'); }
public function it_sequences_a_command(CommandInterface $command) { $command->offsetGet('user_id')->willReturn('U8686'); $command->offsetGet('user_name')->willReturn('agent'); $command->offsetGet('channel_id')->willReturn('C0001'); $command->offsetGet('channel_name')->willReturn('cone'); $this->command($command)->shouldReturn(['channel' => '<#C0001|cone>', 'user' => '<@U8686|agent>']); }