Skip to content

Commit

Permalink
Fix MariaDB CI testing (#1165)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek authored Feb 21, 2024
1 parent 14c9b4f commit 96d5080
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
image: mysql:5.6
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 -e MYSQL_ROOT_PASSWORD=atk4_pass_root -e MYSQL_USER=atk4_test_user -e MYSQL_PASSWORD=atk4_pass -e MYSQL_DATABASE=atk4_test
mariadb:
image: mariadb
image: mariadb:11.2
options: --health-cmd="mariadb-admin ping" --health-interval=10s --health-timeout=5s --health-retries=5 -e MYSQL_ROOT_PASSWORD=atk4_pass_root -e MYSQL_USER=atk4_test_user -e MYSQL_PASSWORD=atk4_pass -e MYSQL_DATABASE=atk4_test
postgres:
image: postgres:12-alpine
Expand Down
10 changes: 5 additions & 5 deletions tests/Persistence/ArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ public function testOrder(): void
['f1' => 'D'],
['f1' => 'E'],
], $d);
self::assertSame($d, array_values($m->export(['f1']))); // array_values to get rid of keys
self::assertSame($d, $m->export(['f1']));

// order by one field descending
$p = new Persistence\Array_($dbData);
Expand All @@ -584,7 +584,7 @@ public function testOrder(): void
['f1' => 'A'],
['f1' => 'A'],
], $d);
self::assertSame($d, array_values($m->export(['f1']))); // array_values to get rid of keys
self::assertSame($d, $m->export(['f1']));

// order by two fields ascending
$p = new Persistence\Array_($dbData);
Expand All @@ -604,7 +604,7 @@ public function testOrder(): void
['id' => 4, 'f1' => 'A', 'f2' => 'C'],
['id' => 1, 'f1' => 'A', 'f2' => 'B'],
], $d);
self::assertSame($d, array_values($m->export(['f1', 'f2', 'id']))); // array_values to get rid of keys
self::assertSame($d, $m->export(['f1', 'f2', 'id']));
}

public function testNoKeyException(): void
Expand Down Expand Up @@ -701,14 +701,14 @@ public function testLimit(): void
['id' => 1, 'f1' => 'A'],
['id' => 2, 'f1' => 'D'],
['id' => 3, 'f1' => 'E'],
], array_values($m->export()));
], $m->export());

$m->setLimit(2, 1);
self::assertSame(2, $m->executeCountQuery());
self::assertSame([
['id' => 2, 'f1' => 'D'],
['id' => 3, 'f1' => 'E'],
], array_values($m->export()));
], $m->export());

// well, this is strange, that you can actually change limit on-the-fly and then previous
// limit is not taken into account, but most likely you will never set it multiple times
Expand Down

0 comments on commit 96d5080

Please sign in to comment.