Skip to content
Snippets Groups Projects
Verified Commit e6ff557d authored by Jiří Pudil's avatar Jiří Pudil
Browse files

add test for upsert()

parent 49f44e9d
No related branches found
No related tags found
1 merge request!60Table: add new methods
Pipeline #59621 passed
......@@ -140,6 +140,9 @@ Assert::same(-7, $updatedRow->getScore());
Assert::throws(fn() => $table->insert($table->new($id, 11)), RowWithGivenPrimaryKeyAlreadyExists::class);
$table->upsert($table->new($id, 17));
Assert::same(17, $table->get(TestPrimaryKey::from($id))->getScore());
$upsertedRow = $table->upsertAndGet($table->new($id, 11));
Assert::same(11, $upsertedRow->getScore());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment