/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->getMockConnector()->expects($this->any())->method('ticketDetails')->willReturnMap([['1', new Ticket('Do something', 1)], ['2', new Ticket('Do something else ', 2)], ['3', new Ticket('Do something more', 3)]]); $repository = $this->getRepository(); // Five entries for today. $start = time(); // 7 hrs. $repository->insert(['tid' => 1, 'start' => $start, 'end' => $start + 3588 * 7]); // 1 hr. $repository->insert(['tid' => 2, 'start' => $start, 'end' => $start + 3600]); // 3 hrs. $repository->insert(['tid' => 3, 'start' => $start, 'end' => $start + 3600 * 3]); }
/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->getMockConnector()->expects($this->any())->method('ticketDetails')->willReturn(new Ticket('Running tests', 123)); }