2 Commits
Author SHA1 Message Date
bachirandClaude Opus 5.5 a656427aec materio_sapi: RankFusionTest as a Drupal UnitTestCase with PHPUnit attributes (T1)
Runs with vendor/bin/phpunit -c web/core: 6 tests, 8 assertions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
2026-11-17 12:57:42 +01:00
bachirandClaude Opus 5.5 26a623b4f6 drupal/core-dev ^11.4 as dev dependency: PHPUnit, phpstan, coder (T1)
Installed with -W -m: 76 dev packages and 4 production packages changed,
symfony/dom-crawler 8.0.12 -> 7.4.22 (core-dev 11.4 needs 7.4; used by
wa72/htmlpagedom for printable), sebastian/diff 7.0.1 -> 6.0.2 (core config
diff), symfony/filesystem and symfony/yaml 7.4.18 -> 7.4.23. Printable HTML
and PDF, config diff and search identical before and after. deploy.sh runs
composer install --no-dev: no dev package on the server. allow-plugins:
phpstan/extension-installer and phpcodesniffer-composer-installer allowed,
php-http/discovery and tbachert/spi denied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
2026-11-17 12:57:42 +01:00
3 changed files with 5071 additions and 55 deletions
+8 -1
View File
@@ -182,7 +182,11 @@
"wikimedia/composer-merge-plugin": true,
"zaporylie/composer-drupal-optimizations": true,
"drupal/core-project-message": true,
"symfony/runtime": true
"symfony/runtime": true,
"phpstan/extension-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"php-http/discovery": false,
"tbachert/spi": false
}
},
"autoload": {
@@ -319,5 +323,8 @@
".gitattributes": "../.gitattributes"
}
}
},
"require-dev": {
"drupal/core-dev": "^11.4"
}
}
Generated
+5057 -46
View File
File diff suppressed because it is too large Load Diff
@@ -5,18 +5,16 @@ declare(strict_types=1);
namespace Drupal\Tests\materio_sapi\Unit;
use Drupal\materio_sapi\RankFusion;
use PHPUnit\Framework\TestCase;
// No Drupal bootstrap needed: RankFusion is plain PHP.
require_once __DIR__ . '/../../../src/RankFusion.php';
use Drupal\Tests\UnitTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
/**
* Tests the merge of the keyword and kNN rankings (H5).
*
* @coversDefaultClass \Drupal\materio_sapi\RankFusion
* @group materio_sapi
*/
final class RankFusionTest extends TestCase {
#[CoversClass(RankFusion::class)]
#[Group('materio_sapi')]
final class RankFusionTest extends UnitTestCase {
/**
* Exact matches stay first, in their order, even when ranked low elsewhere.