Fixes a bug where phpunit marked tests only running our custom assertions as risky.
This commit is contained in:
@@ -18,6 +18,11 @@ class HasAction extends Constraint
|
||||
|
||||
}
|
||||
|
||||
public function count(): int
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public function toString(): string
|
||||
{
|
||||
if ($this->groupTitle) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user