Fixes a bug where phpunit marked tests only running our custom assertions as risky.

This commit is contained in:
Vassyli
2021-01-13 19:32:46 +01:00
committed by Basilius Sauter
parent c4634b90b7
commit 0a2313b5e5
2 changed files with 13 additions and 0 deletions
+5
View File
@@ -18,6 +18,11 @@ class HasAction extends Constraint
}
public function count(): int
{
return 1;
}
public function toString(): string
{
if ($this->groupTitle) {
+8
View File
@@ -60,6 +60,8 @@ class LotGDTestCase extends TestCase
}
}
}
$this->addToAssertionCount(1);
}
/**
@@ -99,6 +101,8 @@ class LotGDTestCase extends TestCase
constraint: static::lessThanOrEqual($timesAtMax),
message: "The desired message {$battleEventText} has been found to exist more than {$timesAtLeast} times",
);
$this->addToAssertionCount(1);
}
/**
@@ -180,6 +184,8 @@ class LotGDTestCase extends TestCase
);
static::assertThat($viewpoint, $constraint, $message);
$this->addToAssertionCount(1);
}
/**
@@ -199,6 +205,8 @@ class LotGDTestCase extends TestCase
$constraint = new HasAction($actionParams, $groupTitle);
static::assertThat($viewpoint, $constraint, $message);
$this->addToAssertionCount(1);
}
}