mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
test: MysqlTest::testTinyintCasting() Use assertEquals for assertions as in other record-retrieval tests.
This commit is contained in:
parent
747f9e3d13
commit
797b7e0a3c
1 changed files with 3 additions and 3 deletions
|
@ -214,19 +214,19 @@ class MysqlTest extends CakeTestCase {
|
||||||
$this->assertTrue((bool)$this->model->save(array('bool' => 5, 'tiny_int' => 5)));
|
$this->assertTrue((bool)$this->model->save(array('bool' => 5, 'tiny_int' => 5)));
|
||||||
$result = $this->model->find('first');
|
$result = $this->model->find('first');
|
||||||
$this->assertTrue($result['Tinyint']['bool']);
|
$this->assertTrue($result['Tinyint']['bool']);
|
||||||
$this->assertSame($result['Tinyint']['tiny_int'], '5');
|
$this->assertEquals($result['Tinyint']['tiny_int'], '5');
|
||||||
$this->model->deleteAll(true);
|
$this->model->deleteAll(true);
|
||||||
|
|
||||||
$this->assertTrue((bool)$this->model->save(array('bool' => 0, 'tiny_int' => 100)));
|
$this->assertTrue((bool)$this->model->save(array('bool' => 0, 'tiny_int' => 100)));
|
||||||
$result = $this->model->find('first');
|
$result = $this->model->find('first');
|
||||||
$this->assertFalse($result['Tinyint']['bool']);
|
$this->assertFalse($result['Tinyint']['bool']);
|
||||||
$this->assertSame($result['Tinyint']['tiny_int'], '100');
|
$this->assertEquals($result['Tinyint']['tiny_int'], '100');
|
||||||
$this->model->deleteAll(true);
|
$this->model->deleteAll(true);
|
||||||
|
|
||||||
$this->assertTrue((bool)$this->model->save(array('bool' => true, 'tiny_int' => 0)));
|
$this->assertTrue((bool)$this->model->save(array('bool' => true, 'tiny_int' => 0)));
|
||||||
$result = $this->model->find('first');
|
$result = $this->model->find('first');
|
||||||
$this->assertTrue($result['Tinyint']['bool']);
|
$this->assertTrue($result['Tinyint']['bool']);
|
||||||
$this->assertSame($result['Tinyint']['tiny_int'], '0');
|
$this->assertEquals($result['Tinyint']['tiny_int'], '0');
|
||||||
$this->model->deleteAll(true);
|
$this->model->deleteAll(true);
|
||||||
|
|
||||||
$this->Dbo->rawQuery('DROP TABLE ' . $this->Dbo->fullTableName($tableName));
|
$this->Dbo->rawQuery('DROP TABLE ' . $this->Dbo->fullTableName($tableName));
|
||||||
|
|
Loading…
Reference in a new issue