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

PetTest::testGetCombatEffects()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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
?>