|
|
@@ -41,22 +41,22 @@ class TypographyHelperTest extends MyCakeTestCase {
|
|
|
*/
|
|
|
public function testFormatCharacter() {
|
|
|
$strs = array(
|
|
|
- '"double quotes"' => '“double quotes”',
|
|
|
+ '"double quotes"' => '“double quotes”',
|
|
|
'"testing" in "theory" that is' => '“testing” in “theory” that is',
|
|
|
- "Here's what I'm" => 'Here’s what I’m',
|
|
|
- '&' => '&',
|
|
|
- '&' => '&',
|
|
|
- ' ' => ' ',
|
|
|
- '--' => '—',
|
|
|
- 'foo...' => 'foo…',
|
|
|
- 'foo..' => 'foo..',
|
|
|
- 'foo...bar.' => 'foo…bar.',
|
|
|
- 'test. new' => 'test. new',
|
|
|
+ "Here's what I'm" => 'Here’s what I’m',
|
|
|
+ '&' => '&',
|
|
|
+ '&' => '&',
|
|
|
+ ' ' => ' ',
|
|
|
+ '--' => '—',
|
|
|
+ 'foo...' => 'foo…',
|
|
|
+ 'foo..' => 'foo..',
|
|
|
+ 'foo...bar.' => 'foo…bar.',
|
|
|
+ 'test. new' => 'test. new',
|
|
|
);
|
|
|
|
|
|
foreach ($strs as $str => $expected) {
|
|
|
$result = $this->Typography->formatCharacters($str);
|
|
|
- echo pre($result);
|
|
|
+ debug($result);
|
|
|
$this->assertEquals($expected, $result);
|
|
|
}
|
|
|
|