Skip to content

Commit

Permalink
Merge "Search: Set up namespaces & Phpunit tests"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Jan 23, 2025
2 parents e85caa8 + 7d980f8 commit 0760df4
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions .phan/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
'client/includes',
'repo/includes',
'repo/rest-api/src',
'repo/domains/search/src',
'lib/includes',
'client/maintenance',
'repo/maintenance',
Expand Down
2 changes: 2 additions & 0 deletions extension-repo.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@
},
"AutoloadNamespaces": {
"Wikibase\\Repo\\": "repo/includes/",
"Wikibase\\Repo\\Domains\\Search\\": "repo/domains/search/src/",
"Wikibase\\Repo\\RestApi\\": "repo/rest-api/src/",
"Wikibase\\Lib\\": "lib/includes/",
"Wikibase\\Lib\\FederatedProperties\\": "lib/packages/wikibase/federated-properties/src/",
Expand All @@ -925,6 +926,7 @@
"Wikibase\\Repo\\Tests\\": "repo/tests/phpunit/includes/",
"Wikibase\\Repo\\Tests\\Maintenance\\": "repo/tests/phpunit/maintenance/",
"Wikibase\\Repo\\Tests\\Unit\\": "repo/tests/phpunit/unit/",
"Wikibase\\Repo\\Tests\\Domains\\Search\\": "repo/domains/search/tests/phpunit/",
"Wikibase\\Repo\\Tests\\RestApi\\": "repo/rest-api/tests/phpunit/",
"Wikibase\\Repo\\Tests\\RestApi\\Architecture\\": "repo/rest-api/tests/architecture/",
"Wikibase\\Lib\\Tests\\": "lib/tests/phpunit/",
Expand Down
1 change: 1 addition & 0 deletions lib/tests/phpunit/PHPUnitTestsHaveGroupWikibaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public static function dirProvider() {
[ 'lib' ],
[ 'repo' ],
[ 'repo/rest-api' ],
[ 'repo/domains/search' ],
[ 'view' ],
];
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\Domains\Search\Application\UseCases\SimpleItemSearch;

/**
* @license GPL-2.0-or-later
*/
class SimpleItemSearch {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php declare( strict_types=1 );

namespace Wikibase\Repo\Domains\Search\Application\UseCases\SimpleItemSearch\SimpleItemSearch;

use PHPUnit\Framework\TestCase;
use Wikibase\Repo\Domains\Search\Application\UseCases\SimpleItemSearch\SimpleItemSearch;

/**
* @covers \Wikibase\Repo\Domains\Search\Application\UseCases\SimpleItemSearch\SimpleItemSearch
*
* @group Wikibase
*
* @license GPL-2.0-or-later
*/
class SimpleItemSearchTest extends TestCase {

public function testCanConstruct(): void {
$this->assertInstanceOf( SimpleItemSearch::class, new SimpleItemSearch() );
}

}
1 change: 1 addition & 0 deletions repo/includes/RepoHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ private static function ensureConstant( string $name, int $value ): void {
public static function registerUnitTests( array &$paths ) {
$paths[] = __DIR__ . '/../tests/phpunit/';
$paths[] = __DIR__ . '/../rest-api/tests/phpunit/';
$paths[] = __DIR__ . '/../domains/search/tests/phpunit/';
}

/**
Expand Down

0 comments on commit 0760df4

Please sign in to comment.