Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions components/ILIAS/Math/tests/ilMathBaseAdapterTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*********************************************************************/

use PHPUnit\Framework\TestCase;
use SebastianBergmann\Diff\Differ;
use SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilder;

/**
* @author Michael Jansen <mjansen@databay.de>
Expand All @@ -45,15 +43,16 @@ protected function setUp(): void
* In PHPUnit 8 the ScalarComparators uses a strict string comparison, so numbers with a different amount of trailing
* 0 decimals are not equal anymore
* @see \SebastianBergmann\Comparator\ScalarComparator
* @param string $actual
* @param string $expected
* @param string $actual
*/
private function assertEqualNumbers(string $actual, string $expected): void
private function assertEqualNumbers(string $expected, string $actual): void
{
$differ = new Differ(new UnifiedDiffOutputBuilder("\n--- Expected\n+++ Actual\n"));

/** @noinspection PhpUnitTestsInspection */
$this->assertTrue($actual == $expected, $differ->diff($actual, $expected));
$this->assertTrue(
$actual == $expected,
sprintf("Failed asserting that '%s' is numerically equal to '%s'.", $actual, $expected)
);
}

#[\PHPUnit\Framework\Attributes\DataProvider('addData')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ public function testStore(): void
->method('manipulateF')
->with('DELETE FROM il_resource_rca WHERE rcid = %s AND rid NOT IN("rid_one", "rid_one")');

$this->db_mock->expects($this->once())
->method('manipulateF')
->with('DELETE FROM il_resource_rca WHERE rcid = %s AND rid NOT IN("rid_one", "rid_one")');

$called_table_names = [
'il_resource_rca',
'il_resource_rca',
Expand Down
Loading