Skip to content

Commit

Permalink
Tidy (bootstrap)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwjames committed May 10, 2020
1 parent 8f07822 commit 8758216
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,23 @@
die( 'Not an entry point' );
}

if ( !is_readable( $path = __DIR__ . '/../../SemanticMediaWiki/tests/autoloader.php' ) ) {
die( 'The SemanticMediaWiki test autoloader is not available' );
error_reporting( E_ALL | E_STRICT );
date_default_timezone_set( 'UTC' );
ini_set( 'display_errors', 1 );

if ( !defined( 'SMW_PHPUNIT_AUTOLOADER_FILE' ) || !is_readable( SMW_PHPUNIT_AUTOLOADER_FILE ) ) {
die( "\nThe Semantic MediaWiki test autoloader is not available" );
}

$width = 25;

if ( !defined( 'SMW_PHPUNIT_FIRST_COLUMN_WIDTH' ) ) {
define( 'SMW_PHPUNIT_FIRST_COLUMN_WIDTH', $width );
}

print sprintf( "\n%-20s%s\n", "Semantic Result Formats: ", SRF_VERSION );
print sprintf( "\n%-{$width}s%s\n", "Semantic Result Formats: ", SRF_VERSION );

$autoloader = require $path;
$autoLoader = require SMW_PHPUNIT_AUTOLOADER_FILE;
$autoloader->addPsr4( 'SRF\\Tests\\', __DIR__ . '/phpunit' );
$autoloader->addPsr4( 'SMW\\Test\\', __DIR__ . '/../../SemanticMediaWiki/tests/phpunit' );
$autoloader->addPsr4( 'SMW\\Tests\\', __DIR__ . '/../../SemanticMediaWiki/tests/phpunit' );
Expand Down

0 comments on commit 8758216

Please sign in to comment.