File tree 1 file changed +9
-8
lines changed
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use BarnabyWalters \Helpers \Helpers as H ;
6
6
7
+ // Load files
7
8
$ vendorPath = realpath (dirname (__DIR__ ) . '/vendor/autoload.php ' );
8
-
9
9
if (file_exists ($ vendorPath ))
10
10
{
11
+ // If the vendor dir exists (the user is in a testing environment) load the autoloader
11
12
ob_start ();
12
13
require $ vendorPath ;
13
14
ob_end_clean ();
14
15
}
15
16
else
16
17
{
17
- require realpath ( dirname ( __DIR__ ) . ' /BarnabyWalters/Helpers.php ' );
18
+ die ( ' Cannot run tests as you haven’t installed the required dependencies ' );
18
19
}
19
20
20
21
/**
21
- * A test suite for app\ helpers
22
- *
23
- * Contains tests for all my helper functions
24
- *
25
- * @author Barnaby Walters http://waterpigs.co.uk
26
- * @autor app\helpers\tests
22
+ * A test suite for barnabywalters/ helpers
23
+ *
24
+ * Contains tests for all my helper functions
25
+ *
26
+ * @author Barnaby Walters http://waterpigs.co.uk
27
+ * @autor app\helpers\tests
27
28
* @todo Move all traces of THE TRUNCENATOR out of here and into their own package
28
29
*/
29
30
class HelpersTest extends \PHPUnit_Framework_TestCase
You can’t perform that action at this time.
0 commit comments