Skip to content

Commit

Permalink
Update SemanticCiteJsonTestCaseScriptRunnerTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
paladox committed Dec 31, 2024
1 parent 969cf22 commit 700a20f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
Binary file added .github/.DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"require": {
"php": ">=7.4",
"composer/installers": ">=1.0.1",
"mediawiki/semantic-media-wiki": "~4.0|~5.0",
"onoi/cache": "~1.2",
"mediawiki/http-request": "~2.0|~1.1",
"onoi/remi":"~0.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@
use SCI\HookRegistry;
use SCI\Options;
use Onoi\Cache\CacheFactory;
use SMW\Tests\LightweightJsonTestCaseScriptRunner;
use SMW\Tests\JsonTestCaseFileHandler;
use SMW\Tests\JSONScriptServicesTestCaseRunner;
use SMW\Tests\Utils\JSONScript\JsonTestCaseFileHandler;
use SMW\Tests\Utils\UtilityFactory;
use SMW\DIWikiPage;

/**
* @group semantic-cite
* @group medium
* @group Database
*
* @license GNU GPL v2+
* @since 1.0
*
* @author mwjames
*/
class SemanticCiteJsonTestCaseScriptRunnerTest extends LightweightJsonTestCaseScriptRunner {
class SemanticCiteJsonTestCaseScriptRunnerTest extends JSONScriptServicesTestCaseRunner {

private $semanticDataValidator;
private $stringValidator;
Expand Down
14 changes: 2 additions & 12 deletions tests/phpunit/Unit/MediaWikiContextInteractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,9 @@ public function testHasAction() {
->disableOriginalConstructor()
->getMock();

$webRequest = $this->getMockBuilder( '\WebRequest' )
->disableOriginalConstructor()
->getMock();

// replaced $this->once() with $this->any(), is that correct ?
$webRequest->expects( $this->any() )
->method( 'getVal' )
->will( $this->returnValue( 'view' ) );

// replaced $this->once() with $this->any(), is that correct ?
$context->expects( $this->any() )
->method( 'getRequest' )
->will( $this->returnValue( $webRequest ) );
->method( 'getActionName' )
->willReturn( 'view');

$instance = new MediaWikiContextInteractor( $context );

Expand Down

0 comments on commit 700a20f

Please sign in to comment.