mirror of
https://github.com/koel/koel
synced 2024-11-15 00:47:18 +00:00
26 lines
587 B
PHP
26 lines
587 B
PHP
<?php
|
|
|
|
namespace Tests\Integration\Repositories;
|
|
|
|
use App\Models\Song;
|
|
use App\Repositories\SongRepository;
|
|
use Tests\TestCase;
|
|
|
|
class SongRepositoryTest extends TestCase
|
|
{
|
|
private SongRepository $songRepository;
|
|
|
|
public function setUp(): void
|
|
{
|
|
parent::setUp();
|
|
|
|
$this->songRepository = app(SongRepository::class);
|
|
}
|
|
|
|
public function testGetOneByPath(): void
|
|
{
|
|
/** @var Song $song */
|
|
$song = Song::factory()->create(['path' => 'foo']);
|
|
self::assertSame($song->id, $this->songRepository->findOneByPath('foo')->id);
|
|
}
|
|
}
|