mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +00:00
Correct spuriously failing tests
This commit is contained in:
parent
e76871c567
commit
b8b559b0f8
3 changed files with 3 additions and 3 deletions
|
@ -415,7 +415,7 @@ trait SeriesArticle {
|
|||
|
||||
/** @dataProvider provideContextMatches */
|
||||
public function testListArticlesCheckingContext(Context $c, array $exp) {
|
||||
$ids = array_column($ids = Arsse::$db->articleList("john.doe@example.com", $c)->getAll(), "id");
|
||||
$ids = array_column($ids = Arsse::$db->articleList("john.doe@example.com", $c, ["id"], ["id"])->getAll(), "id");
|
||||
sort($ids);
|
||||
sort($exp);
|
||||
$this->assertEquals($exp, $ids);
|
||||
|
|
|
@ -16,6 +16,6 @@ class TestDatabase extends \JKingWeb\Arsse\TestCase\Database\Base {
|
|||
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQL;
|
||||
|
||||
protected function nextID(string $table): int {
|
||||
return (int) (static::$drv->query("SELECT auto_increment from information_schema.tables where table_name = '$table'")->getValue() ?? 1);
|
||||
return (int) (static::$drv->query("SELECT (case when max(id) then max(id) else 0 end)+1 from $table")->getValue() ?? 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,6 @@ class TestDatabase extends \JKingWeb\Arsse\TestCase\Database\Base {
|
|||
use \JKingWeb\Arsse\TestCase\DatabaseDrivers\MySQLPDO;
|
||||
|
||||
protected function nextID(string $table): int {
|
||||
return (int) (static::$drv->query("SELECT auto_increment from information_schema.tables where table_name = '$table'")->getValue() ?? 1);
|
||||
return (int) (static::$drv->query("SELECT (case when max(id) then max(id) else 0 end)+1 from $table")->getValue() ?? 1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue