From 7feab9dfc62f8dfc6b52cb565f52bc047ae96452 Mon Sep 17 00:00:00 2001 From: Damien Harper Date: Fri, 10 Jan 2025 08:22:05 +0100 Subject: [PATCH] Make `Reader` and `Query` implement interfaces so that their mocking is easier, fixes #201 --- src/Provider/Doctrine/Persistence/Reader/Query.php | 2 +- src/Provider/Doctrine/Persistence/Reader/QueryInterface.php | 5 +++++ src/Provider/Doctrine/Persistence/Reader/Reader.php | 2 +- src/Provider/Doctrine/Persistence/Reader/ReaderInterface.php | 5 +++++ 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 src/Provider/Doctrine/Persistence/Reader/QueryInterface.php create mode 100644 src/Provider/Doctrine/Persistence/Reader/ReaderInterface.php diff --git a/src/Provider/Doctrine/Persistence/Reader/Query.php b/src/Provider/Doctrine/Persistence/Reader/Query.php index 8fa99c3..f8051fa 100644 --- a/src/Provider/Doctrine/Persistence/Reader/Query.php +++ b/src/Provider/Doctrine/Persistence/Reader/Query.php @@ -20,7 +20,7 @@ /** * @see QueryTest */ -final class Query +final class Query implements QueryInterface { /** * @var string diff --git a/src/Provider/Doctrine/Persistence/Reader/QueryInterface.php b/src/Provider/Doctrine/Persistence/Reader/QueryInterface.php new file mode 100644 index 0000000..981c473 --- /dev/null +++ b/src/Provider/Doctrine/Persistence/Reader/QueryInterface.php @@ -0,0 +1,5 @@ +