Skip to content

Commit

Permalink
Fixed a testcase, support PostgreSQL 9.1
Browse files Browse the repository at this point in the history
Signed-off-by: mark_story <mark@mark-story.com>
  • Loading branch information
suzuki authored and markstory committed Feb 28, 2012
1 parent d577d6b commit 757579e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php
Expand Up @@ -852,23 +852,23 @@ public function testAlteringTwoTables() {
$this->assertEquals(2, substr_count($result, 'field_two'), 'Too many fields');
$this->assertFalse(strpos(';ALTER', $result), 'Too many semi colons');
}

/**
* test encoding setting.
*
* @return void
*/
public function testEncoding() {
$result = $this->Dbo->setEncoding('utf8');
$result = $this->Dbo->setEncoding('UTF8');
$this->assertTrue($result) ;

$result = $this->Dbo->getEncoding();
$this->assertEquals('utf8', $result) ;
$result = $this->Dbo->setEncoding('EUC-JP');
$this->assertEquals('UTF8', $result) ;

$result = $this->Dbo->setEncoding('EUC_JP'); /* 'EUC_JP' is right character code name in PostgreSQL */
$this->assertTrue($result) ;

$result = $this->Dbo->getEncoding();
$this->assertEquals('EUC-JP', $result) ;
$this->assertEquals('EUC_JP', $result) ;
}
}

0 comments on commit 757579e

Please sign in to comment.