From d039a5d62a9ac6ababae70d9d96422ca59f2b2d4 Mon Sep 17 00:00:00 2001 From: Brett Parson Date: Fri, 21 Aug 2026 13:55:37 -0500 Subject: Scaffold miniroute routing/middleware kernel --- tests/Fixtures/FakeResolver.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/Fixtures/FakeResolver.php (limited to 'tests/Fixtures/FakeResolver.php') diff --git a/tests/Fixtures/FakeResolver.php b/tests/Fixtures/FakeResolver.php new file mode 100644 index 0000000..af6ec1f --- /dev/null +++ b/tests/Fixtures/FakeResolver.php @@ -0,0 +1,28 @@ + */ + private array $bindings = []; + + public function bind(string $class, object $instance): void + { + $this->bindings[$class] = $instance; + } + + public function resolve(string $class): object + { + if (!array_key_exists($class, $this->bindings)) { + throw new RuntimeException("No binding for {$class}"); + } + + return $this->bindings[$class]; + } +} -- cgit v1.2.3