Skip to content
This repository
Browse code

Fixed a testcase, support PostgreSQL 9.1

Signed-off-by: mark_story <mark@mark-story.com>
  • Loading branch information...
commit 757579e1d190b60db15db0ebe659661432f74182 1 parent d577d6b
Norio Suzuki authored February 24, 2012 markstory committed February 28, 2012
16  lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php
@@ -852,23 +852,23 @@ public function testAlteringTwoTables() {
852 852
 		$this->assertEquals(2, substr_count($result, 'field_two'), 'Too many fields');
853 853
 		$this->assertFalse(strpos(';ALTER', $result), 'Too many semi colons');
854 854
 	}
855  
-	
  855
+
856 856
 /**
857 857
  * test encoding setting.
858 858
  *
859 859
  * @return void
860 860
  */
861 861
 	public function testEncoding() {
862  
-		$result = $this->Dbo->setEncoding('utf8');
  862
+		$result = $this->Dbo->setEncoding('UTF8');
863 863
 		$this->assertTrue($result) ;
864  
-		
  864
+
865 865
 		$result = $this->Dbo->getEncoding();
866  
-		$this->assertEquals('utf8', $result) ;
867  
-		
868  
-		$result = $this->Dbo->setEncoding('EUC-JP');
  866
+		$this->assertEquals('UTF8', $result) ;
  867
+
  868
+		$result = $this->Dbo->setEncoding('EUC_JP'); /* 'EUC_JP' is right character code name in PostgreSQL */
869 869
 		$this->assertTrue($result) ;
870  
-		
  870
+
871 871
 		$result = $this->Dbo->getEncoding();
872  
-		$this->assertEquals('EUC-JP', $result) ;
  872
+		$this->assertEquals('EUC_JP', $result) ;
873 873
 	}
874 874
 }

0 notes on commit 757579e

Please sign in to comment.
Something went wrong with that request. Please try again.