NL
apps/winzik / tests / CoversTest.php · commit 6576d6f
<?phpnamespace Tests;use App\Media\Covers;use App\Model\Id3Tag;use PHPUnit\Framework\TestCase;final class CoversTest extends TestCase{    public function testDeezersAnswerIsKeptOnlyForTheSameSong(): void    {        $tag = new Id3Tag('WinZik', 'WinZik Band');        self::assertFalse(Covers::sameSong($tag, 'winzik', 'Windiges Grab', 'Nele Bruun'), 'another record: no cover');        self::assertTrue(Covers::sameSong(new Id3Tag('Été (Remix)', 'Zaz'), 'x', 'Ete', 'ZAZ'), 'accents and case do not matter');        self::assertFalse(Covers::sameSong(new Id3Tag('Hello', 'Adele'), 'x', 'Hello', 'Lionel Richie'), 'same title, another artist');        self::assertTrue(Covers::sameSong(new Id3Tag(), 'Daft Punk - One More Time', 'One More Time', 'Daft Punk'), 'no tag: the file name');    }}