From eb53bce2575e20e904844dc688bf6f590a1b264f Mon Sep 17 00:00:00 2001 From: Tom Butler Date: Tue, 6 Mar 2018 15:20:12 +0000 Subject: [PATCH] added file exists check to test data loading --- tests/DiceTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/DiceTest.php b/tests/DiceTest.php index 8c8f8be..b02c012 100644 --- a/tests/DiceTest.php +++ b/tests/DiceTest.php @@ -14,7 +14,10 @@ public function __construct() { //Load the test classes for this test $name = str_replace('Test', '', get_class($this)); require_once 'tests/TestData/Basic.php'; - require_once 'tests/TestData/' . $name . '.php'; + + if (file_exists('tests/TestData/' . $name . '.php')) { + require_once 'tests/TestData/' . $name . '.php'; + } } public function autoload($class) {