예제 #1
0
 public function testEqualsIgnoreCase()
 {
     $str1 = new Str("Hello, world.");
     $str2 = new Str("HELLO, WORLD.");
     $this->assertTrue($str1->equalsIgnoreCase($str1));
     $str3 = new Str("ABCD");
     $this->assertTrue($str3->equalsIgnoreCase("abcd"));
     $str4 = new Str("1234");
     try {
         $this->assertFalse($str4->equalsIgnoreCase(1234));
     } catch (StrInvalidArgumentException $ex) {
         $this->assertEquals(get_class($ex), 'Str\\StrInvalidArgumentException');
     }
 }