mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-03 18:04:08 +02:00
Add php-cs-fixer
This commit is contained in:
parent
e00e6ece5f
commit
309ae17036
54 changed files with 4900 additions and 4106 deletions
|
|
@ -6,22 +6,22 @@ use Demostf\API\Data\DemoPlayer;
|
|||
use Demostf\API\Test\TestCase;
|
||||
|
||||
class DemoPlayerTest extends TestCase {
|
||||
public function testParseSerialize() {
|
||||
$data = [
|
||||
'id' => 1,
|
||||
'user_id' => 2,
|
||||
'name' => 'foo',
|
||||
'team' => 'red',
|
||||
'class' => 'sniper',
|
||||
'steamid' => 'asd',
|
||||
'avatar' => 'asd.png',
|
||||
'kills' => 5,
|
||||
'assists' => 3,
|
||||
'deaths' => 7
|
||||
];
|
||||
public function testParseSerialize() {
|
||||
$data = [
|
||||
'id' => 1,
|
||||
'user_id' => 2,
|
||||
'name' => 'foo',
|
||||
'team' => 'red',
|
||||
'class' => 'sniper',
|
||||
'steamid' => 'asd',
|
||||
'avatar' => 'asd.png',
|
||||
'kills' => 5,
|
||||
'assists' => 3,
|
||||
'deaths' => 7
|
||||
];
|
||||
|
||||
$demoPlayer = DemoPlayer::fromRow($data);
|
||||
$demoPlayer = DemoPlayer::fromRow($data);
|
||||
|
||||
$this->assertEquals($data, $demoPlayer->jsonSerialize());
|
||||
}
|
||||
$this->assertEquals($data, $demoPlayer->jsonSerialize());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue