AK
Size: a a a
AK
С
P
P
P
С
AK
С
$tm = 'kodeks';
factory(Bulletin::class, $this->announceCount)->create([
'tm' => $tm,
'file_name' => Str::random()
]);
$top = $this->service->getTopList($tm);
$this->assertTrue($top->count() === $this->announceCount);
$top->map(function ($item, $key) {
$this->assertNotNull($item->file_name);
$this->assertTrue($item->tm === 'kodeks');
});
factory(Bulletin::class, $this->announceCount)->create([
'tm' => $tm,
'file_name' => Str::random() . ' for_archive'
]);
$archive = $this->service->getArchiveList($tm, $top);
$archive->map(function ($item, $key) use ($archive, $top) {
$this->assertTrue($archive->whereNotIn('id', $top->pluck('id')));
$this->assertNotNull($item->file_name);
});
P
AK
AK
С
P
С
С
С
P
С
С