Пример #1
0
 function it_gets_random_ids_from_a_table(TableFetcher $tableFetcher)
 {
     $take = 4;
     $randomIds = [3, 6, 7, 2];
     $table = 'images';
     $tableFetcher->getRandomIds($table, $take)->shouldBeCalled()->willReturn($randomIds);
     $this->getRandomIdsFromTable($table, $take)->shouldReturn($randomIds);
 }
Пример #2
0
 /**
  * @inheritdoc
  */
 public function getRandomIdsFromTable($table, $take)
 {
     return $this->db->getRandomIds($table, $take);
 }