Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed: missing check for availablity of the directory scanner

  • Loading branch information...
commit 2a5f6a4a91385b8a17bfec84bc31b76249a262c0 1 parent 7fba422
@lapistano authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 accepted/tests/Psr0_Scanner.php
View
11 accepted/tests/Psr0_Scanner.php
@@ -104,7 +104,16 @@ protected function parseFile($file)
*/
protected function initScanner()
{
- require __DIR__ . '/vendor/TheSeer/DirectoryScanner/autoload.php';
+ if(! class_exists('\TheSeer\DirectoryScanner\DirectoryScanner', true)) {
+ $dirScanner = __DIR__ . '/vendor/TheSeer/DirectoryScanner/autoload.php';
+ if (!file_exists($dirScanner)) {
+ throw new \BadFunctionCallException(
+ 'Cannot find directory scanner mandatory for PSR-0 cpmatibility tests. '.
+ 'Please run install.sh in the test root directory.'
+ );
+ }
+ require $dirScanner;
+ }
$scanner = new \TheSeer\DirectoryScanner\DirectoryScanner;
$this->registerExclusions($scanner);
Please sign in to comment.
Something went wrong with that request. Please try again.