Skip to content

Commit

Permalink
added file exists check to test data loading
Browse files Browse the repository at this point in the history
  • Loading branch information
TRPB committed Mar 6, 2018
1 parent 668fb15 commit eb53bce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/DiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit eb53bce

Please sign in to comment.