mirror of
https://github.com/libretro/libretro-netplay-registry.git
synced 2026-11-09 17:25:29 -10:00
19 lines
684 B
PHP
19 lines
684 B
PHP
<?php
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
require_once(__DIR__ . '/TestBase.php');
|
|
require_once(__DIR__ . '/../src/autoload.php');
|
|
|
|
class PlaylistFormatterTest extends TestBase
|
|
{
|
|
function testToString() {
|
|
$entry = $this->randomEntry();
|
|
$this->registry->insert($entry, false);
|
|
|
|
$entries = $this->registry->selectAll();
|
|
$entry = $entries[0];
|
|
$output = "{$entry['username']}\n{$entry['ip']}\n{$entry['port']}\n{$entry['corename']}\n{$entry['coreversion']}\n{$entry['gamename']}\n{$entry['gamecrc']}\n{$entry['created']}";
|
|
$playlist = new PlaylistFormatter($this->registry);
|
|
$this->assertEquals($output, (string)$playlist);
|
|
}
|
|
} |