mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 08:09:18 +02:00
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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user