Skip to content

Commit

Permalink
Add CI for MW 1.41 (#136)
Browse files Browse the repository at this point in the history
* Add CI for MW 1.41

* Update extension.json

* Update extension.json

* Update composer.json

* Update composer.json

* Update SemanticCiteJsonTestCaseScriptRunnerTest.php
  • Loading branch information
paladox authored Dec 31, 2024
1 parent 60f6b22 commit bb42818
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 22 deletions.
Binary file added .github/.DS_Store
Binary file not shown.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ jobs:
database_image: "mariadb:11.2"
coverage: true
experimental: false
- mediawiki_version: '1.41'
smw_version: dev-master
php_version: 8.1
database_type: mysql
database_image: "mariadb:11.2"
coverage: false
experimental: false

env:
MW_VERSION: ${{ matrix.mediawiki_version }}
Expand Down
11 changes: 5 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@
},
"require": {
"php": ">=7.4",
"composer/installers": "^1.0.12",
"mediawiki/semantic-media-wiki": "~4.0|~5.0",
"composer/installers": ">=1.0.1",
"onoi/cache": "~1.2",
"mediawiki/http-request": "~2.0|~1.1",
"onoi/remi":"~0.2"
},
"require-dev": {
"mediawiki/semantic-media-wiki": "@dev"
},
"autoload": {
"files" : [
"SemanticCite.php"
Expand All @@ -45,7 +41,10 @@
}
},
"config": {
"process-timeout": 0
"process-timeout": 0,
"allow-plugins": {
"composer/installers": true
}
},
"scripts":{
"test-coverage": [
Expand Down
6 changes: 5 additions & 1 deletion extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@
}
},
"AutoloadNamespaces": {
"SCI\\": "src"
"SCI\\": "src/"
},
"AutoloadClasses": {
"SemanticCite": "SemanticCite.php"
},
"TestAutoloadNamespaces": {
"SCI\\Tests\\": "tests/phpunit/Unit/",
"SCI\\Tests\\Integration\\": "tests/phpunit/Integration/"
},
"MessagesDirs": {
"SemanticCite": [
"i18n"
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 bb42818

Please sign in to comment.