From e833403be6f42b0ebde1269882f7597fbfeb5b94 Mon Sep 17 00:00:00 2001 From: Travis Weston Date: Wed, 5 Jul 2023 10:21:11 -0400 Subject: [PATCH] Feature/dependencies test trait (#405) * Add new Dependency_Assertions trait * Fix linting --- .../concerns/trait-dependency-assertions.php | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 src/mantle/testing/concerns/trait-dependency-assertions.php diff --git a/src/mantle/testing/concerns/trait-dependency-assertions.php b/src/mantle/testing/concerns/trait-dependency-assertions.php new file mode 100644 index 000000000..3729fb9cd --- /dev/null +++ b/src/mantle/testing/concerns/trait-dependency-assertions.php @@ -0,0 +1,68 @@ +filter( fn( $file ) => strpos( $file, $dependency ) !== false ) + ->count() > 0, + sprintf( + '%s dependency not found in included files.', + (string) $dependency + ) + ); + } + +}