mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixed a testcase, support PostgreSQL 9.1
Signed-off-by: mark_story <mark@mark-story.com>
This commit is contained in:
parent
d577d6b84e
commit
757579e1d1
1 changed files with 8 additions and 8 deletions
|
@ -852,23 +852,23 @@ class PostgresTest extends CakeTestCase {
|
||||||
$this->assertEquals(2, substr_count($result, 'field_two'), 'Too many fields');
|
$this->assertEquals(2, substr_count($result, 'field_two'), 'Too many fields');
|
||||||
$this->assertFalse(strpos(';ALTER', $result), 'Too many semi colons');
|
$this->assertFalse(strpos(';ALTER', $result), 'Too many semi colons');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test encoding setting.
|
* test encoding setting.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testEncoding() {
|
public function testEncoding() {
|
||||||
$result = $this->Dbo->setEncoding('utf8');
|
$result = $this->Dbo->setEncoding('UTF8');
|
||||||
$this->assertTrue($result) ;
|
$this->assertTrue($result) ;
|
||||||
|
|
||||||
$result = $this->Dbo->getEncoding();
|
$result = $this->Dbo->getEncoding();
|
||||||
$this->assertEquals('utf8', $result) ;
|
$this->assertEquals('UTF8', $result) ;
|
||||||
|
|
||||||
$result = $this->Dbo->setEncoding('EUC-JP');
|
$result = $this->Dbo->setEncoding('EUC_JP'); /* 'EUC_JP' is right character code name in PostgreSQL */
|
||||||
$this->assertTrue($result) ;
|
$this->assertTrue($result) ;
|
||||||
|
|
||||||
$result = $this->Dbo->getEncoding();
|
$result = $this->Dbo->getEncoding();
|
||||||
$this->assertEquals('EUC-JP', $result) ;
|
$this->assertEquals('EUC_JP', $result) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue