Add code coverage configuration (phpunit.xml source filter), baseline coverage report (21.27% lines), gitignore coverage/ and .phpunit.result.cache; remove deprecated setAccessible() calls

This commit is contained in:
Pontoporeia
2026-05-20 02:03:55 +02:00
parent a047062d87
commit a6e0aa5887
9 changed files with 17 additions and 14 deletions

View File

@@ -25,7 +25,6 @@ class DatabaseExtendedTest extends TestCase
// Build conditions with special LIKE characters in query
// Use reflection to call the private method
$ref = new ReflectionMethod(Database::class, 'escapeLikeString');
$ref->setAccessible(true);
$this->assertSame('\\\\', $ref->invoke($this->db, '\\'));
$this->assertSame('\\%', $ref->invoke($this->db, '%'));
@@ -39,7 +38,6 @@ class DatabaseExtendedTest extends TestCase
public function testBuildSearchConditionsEmptyParams(): void
{
$ref = new ReflectionMethod(Database::class, 'buildSearchConditions');
$ref->setAccessible(true);
[$conditions, $bindings] = $ref->invoke($this->db, []);
@@ -51,7 +49,6 @@ class DatabaseExtendedTest extends TestCase
public function testBuildSearchConditionsWithQuery(): void
{
$ref = new ReflectionMethod(Database::class, 'buildSearchConditions');
$ref->setAccessible(true);
[$conditions, $bindings] = $ref->invoke($this->db, ['query' => 'test']);
@@ -63,7 +60,6 @@ class DatabaseExtendedTest extends TestCase
public function testBuildSearchConditionsWithYear(): void
{
$ref = new ReflectionMethod(Database::class, 'buildSearchConditions');
$ref->setAccessible(true);
[$conditions, $bindings] = $ref->invoke($this->db, ['year' => 2024]);
@@ -74,7 +70,6 @@ class DatabaseExtendedTest extends TestCase
public function testBuildSearchConditionsWithAllFilters(): void
{
$ref = new ReflectionMethod(Database::class, 'buildSearchConditions');
$ref->setAccessible(true);
[$conditions, $bindings] = $ref->invoke($this->db, [
'query' => 'art',