Skip to content

Commit

Permalink
Add JsonScript test class
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenDeDauw committed Aug 3, 2019
1 parent 87f6ec8 commit d063510
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
4 changes: 4 additions & 0 deletions phpunit.xml.dist
@@ -1,5 +1,6 @@
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="tests/bootstrap.php"
cacheTokens="false"
colors="true"
convertErrorsToExceptions="true"
Expand All @@ -16,6 +17,9 @@
<testsuite name="ModernTimelineIntegration">
<directory>tests/Integration</directory>
</testsuite>
<testsuite name="ModernTimelineSystem">
<directory>tests/System</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
Expand Down
15 changes: 15 additions & 0 deletions tests/System/JsonScriptTest.php
@@ -0,0 +1,15 @@
<?php

declare( strict_types = 1 );

namespace ModernTimeline\Tests\System;

use SMW\Tests\Integration\JSONScript\JsonTestCaseScriptRunnerTest;

class JsonScriptTest extends JsonTestCaseScriptRunnerTest {

protected function getTestCaseLocation() {
return __DIR__ . '/JsonScript';
}

}
18 changes: 18 additions & 0 deletions tests/bootstrap.php
@@ -0,0 +1,18 @@
<?php

declare( strict_types = 1 );

if ( PHP_SAPI !== 'cli' ) {
die( 'Not an entry point' );
}

error_reporting( -1 );
ini_set( 'display_errors', '1' );

if ( !is_readable( $autoloaderClassPath = __DIR__ . '/../../SemanticMediaWiki/tests/autoloader.php' ) ) {
die( "\nThe Semantic MediaWiki test autoloader is not available" );
}

require $autoloaderClassPath;

$autoloader->addPsr4( 'SMW\\Tests\\', __DIR__ . '/../../SemanticMediaWiki/tests/phpunit' );

0 comments on commit d063510

Please sign in to comment.