Fixing tests for WPDO

This commit is contained in:
absurdo 2023-10-28 12:52:05 +02:00
parent 2b63ba42ca
commit 2d029548f2
2 changed files with 25 additions and 4 deletions

View file

@ -78,6 +78,24 @@ final class WPDOTest extends TestCase {
}
/**
* @depends testInsert
*/
public function testUpdate() {
global $pdo;
$this->assertTrue($pdo->update(['name'], ['first_updated'], 'WHERE name=?', ['first']));
$this->assertTrue($pdo->select(['name'], 'WHERE name=? AND type=?', ['first_updated', 1]));
$arr_result=$pdo->sth->fetchAll();
$this->assertEquals([['name' => 'first_updated', 0 => 'first_updated']], $arr_result);
}
/**
* @depends testCreateTable
*/