Passed
Push — master ( bc69e6...465240 )
by Jakub
12:35
created

PetTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 8
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetCombatEffects() 0 7 1
1
<?php
2
declare(strict_types=1);
3
4
namespace HeroesofAbenez\Combat;
5
6
require __DIR__ . "/../../bootstrap.php";
7
8
use Tester\Assert;
9
10
/**
11
 * @author Jakub Konečný
12
 * @testCase
13
 */
14
final class PetTest extends \Tester\TestCase {
15
  public function testGetCombatEffects(): void {
16
    $pet = new Pet([
17
      "id" => 1, "deployed" => false, "bonusStat" => Character::STAT_STRENGTH, "bonusValue" => 10,
18
    ]);
19
    Assert::count(0, $pet->getCombatEffects());
20
    $pet->deployed = true;
21
    Assert::count(1, $pet->getCombatEffects());
22
  }
23
}
24
25
$test = new PetTest();
26
$test->run();
27
?>