From fbe1edf8f05ab306ba6d53667e4f11d74f3309f6 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 1 Apr 2019 13:19:01 +0100 Subject: [PATCH] Throw Exception if there is no addresses file Fixes #14 --- src/Exception/PartialNotFoundException.php | 5 +++++ src/Service/Addresses.php | 9 ++++++--- tests/Unit/Service/AddressesTest.php | 7 +++++++ 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 src/Exception/PartialNotFoundException.php diff --git a/src/Exception/PartialNotFoundException.php b/src/Exception/PartialNotFoundException.php new file mode 100644 index 0000000..f434027 --- /dev/null +++ b/src/Exception/PartialNotFoundException.php @@ -0,0 +1,5 @@ +expectException(\RuntimeException::class); + + Addresses::load('does-not-exist'); + } } class FakeAddresses extends Addresses