Permalink
Browse files

Another stab at fixing cleanString test

Signed-off-by: Darren Hill <dchill42@gmail.com>
  • Loading branch information...
1 parent 11a943e commit f6148dc3092a32c16392f0542a1c6507842a6ada @dchill42 dchill42 committed Feb 27, 2014
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/Xylophone/core/Utf8Test.php
@@ -75,7 +75,7 @@ public function testCleanStringDisabled()
$utf8->iconv_enabled = false;
// Set up arg and call cleanString()
- $str = chr(0xC4).chr(0xA7).chr(0xC7).chr(0xCC).chr(0xCC);
+ $str = "\xC4\xA7\xC7\xCC\xCC";
$this->assertEquals($str, $utf8->cleanString($str));
}
@@ -90,7 +90,7 @@ public function testCleanStringAscii()
$utf8->iconv_enabled = true;
// Set up arg and call cleanString()
- $str = chr(0xC4).chr(0xA7).chr(0xC7).chr(0xCC).chr(0xCC);
+ $str = "\xC4\xA7\xC7\xCC\xCC";
$this->assertEquals($str, $utf8->cleanString($str));
}
@@ -106,7 +106,7 @@ public function testCleanString()
// Set up args and call cleanString()
$clean = 'hi';
- $str = $clean.chr(0xC4).chr(0xFF);
+ $str = $clean."\x80\x81";
$this->assertEquals($clean, $utf8->cleanString($str));
}
@@ -171,7 +171,7 @@ public function testIsAscii()
// Call isAscii() with ASCII and not
$this->assertTrue($utf8->isAscii('ascii string'));
- $this->assertFalse($utf8->isAscii(chr(0xF0).chr(0xBA)));
+ $this->assertFalse($utf8->isAscii("\xF0\xBA"));
}
}

0 comments on commit f6148dc

Please sign in to comment.