Archived
1
0
Fork 0

Formatting fixes and cleanup.

This commit is contained in:
Henrik Hautakoski 2023-01-31 07:34:02 +01:00
parent a1e14a3e60
commit 51fb71e469
41 changed files with 394 additions and 392 deletions

View file

@ -19,7 +19,7 @@ class CardTest extends TestCase
protected $characters;
public function setUp() : void
public function setUp(): void
{
parent::setUp();
@ -47,24 +47,24 @@ class CardTest extends TestCase
public function provider(): array
{
return [
[ [ 0 ], 16 ],
[ [ 0, 1 ], 18 ],
[[0], 16],
[[0, 1], 18],
];
}
public function providerClasses(): array
{
return [
[ [ 'priest' ], 16 ],
[ [ 'priest', 'warrior' ], 18 ],
[['priest'], 16],
[['priest', 'warrior'], 18],
];
}
public function providerRoles(): array
{
return [
[ [ 'dps' ], 16 ],
[ [ 'dps', 'tank' ], 18 ],
[['dps'], 16],
[['dps', 'tank'], 18],
];
}
@ -74,7 +74,7 @@ class CardTest extends TestCase
public function test_get_with_character_settings($characters, $count)
{
$settings = new GameSettings();
foreach($characters as $i) {
foreach ($characters as $i) {
$settings->characters->set($this->characters[$i]);
}
@ -82,11 +82,11 @@ class CardTest extends TestCase
$this->assertSame($count, count($cards));
$expected = collect($characters)->map(function($i) {
$expected = collect($characters)->map(function ($i) {
return $this->characters[$i];
})->push(null);
foreach($cards as $card) {
foreach ($cards as $card) {
$this->assertContains($card->character_id, $expected, $cards->pluck('character_id'));
}
}
@ -97,7 +97,7 @@ class CardTest extends TestCase
public function test_get_with_raid_settings($raids, $count)
{
$settings = new GameSettings();
foreach($raids as $i) {
foreach ($raids as $i) {
$settings->raids->set($this->raids[$i]);
}
@ -105,11 +105,11 @@ class CardTest extends TestCase
$this->assertSame($count, count($cards));
$expected = collect($raids)->map(function($item) {
$expected = collect($raids)->map(function ($item) {
return $this->raids[$item];
})->push(null);
foreach($cards as $card) {
foreach ($cards as $card) {
$this->assertContains($card->raid_id, $expected);
}
}
@ -120,7 +120,7 @@ class CardTest extends TestCase
public function test_get_with_class_settings($classes, $count)
{
$settings = new GameSettings();
foreach($classes as $class) {
foreach ($classes as $class) {
$settings->classes->set($class);
}
@ -130,7 +130,7 @@ class CardTest extends TestCase
$expected = collect($classes)->push(null);
foreach($cards as $card) {
foreach ($cards as $card) {
$this->assertContains($card->class, $expected);
}
}
@ -141,7 +141,7 @@ class CardTest extends TestCase
public function test_get_with_role_settings($roles, $count)
{
$settings = new GameSettings();
foreach($roles as $role) {
foreach ($roles as $role) {
$settings->roles->set($role);
}
@ -151,7 +151,7 @@ class CardTest extends TestCase
$expected = collect($roles)->push(null);
foreach($cards as $card) {
foreach ($cards as $card) {
$this->assertContains($card->role, $expected);
}
}