summaryrefslogtreecommitdiff
path: root/tests/Utils
diff options
context:
space:
mode:
authorSam Light <sam@lightscale.co.uk>2026-06-10 19:00:33 +0100
committerSam Light <sam@lightscale.co.uk>2026-06-10 19:00:33 +0100
commiteb9aa22170ce921d2816db539dd865986f0ba6bc (patch)
tree89495041a4da27e7b4536b058a9a6dc041fdf843 /tests/Utils
parentfe39ea0aa5a6993ad5edaa6f0f338763ed610ec9 (diff)
testing middleware dispatch
Diffstat (limited to 'tests/Utils')
-rw-r--r--tests/Utils/TestMiddleware.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/Utils/TestMiddleware.php b/tests/Utils/TestMiddleware.php
index eb3ea04..e273d05 100644
--- a/tests/Utils/TestMiddleware.php
+++ b/tests/Utils/TestMiddleware.php
@@ -34,6 +34,21 @@ class TestMiddleware implements Middleware
Assert::assertGreaterThan(0, $this->calls);
}
+ public function assertCalledTimes(int $val): void
+ {
+ Assert::assertSame($val, $this->calls);
+ }
+
+ public function assertCalledOnce(): void
+ {
+ $this->assertCalledTimes(1);
+ }
+
+ public function assertNotCalled(): void
+ {
+ $this->assertCalledTimes(0);
+ }
+
public function assertCallNumber(int $num): void
{
Assert::assertSame($num, $this->call);