/** * 限定公開記事は通知されない */ public function testShouldNotNotifyWhenItemIsNotPublishedAndLimitation() { $this->itemRepo->shouldReceive('getByOpenItemId')->andReturn($this->createMockItem("1")); $this->userRepo->shouldReceive('getById')->andReturn($this->dummyUser); $this->slackUtilMock->shouldNotReceive('postEditMessage'); $this->slackUtilMock->shouldNotReceive('postCreateMessage'); $editEvent = new EditEvent('itemId', 'userId'); $this->handler->onItemEdited($editEvent); $createEvent = new CreateEvent('itemId', 'userId'); $this->handler->onItemCreated($createEvent); }