PetTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetCombatEffects() 0 8 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
{
16
    public function testGetCombatEffects(): void
17
    {
18
        $pet = new Pet([
19
            "id" => 1, "deployed" => false, "bonusStat" => Character::STAT_STRENGTH, "bonusValue" => 10,
20
        ]);
21
        Assert::count(0, $pet->getCombatEffects());
22
        $pet->deployed = true;
23
        Assert::count(1, $pet->getCombatEffects());
24
    }
25
}
26
27
$test = new PetTest();
28
$test->run();
29