Skip to content

Commit

Permalink
Merge pull request #79 from peter279k/improve_assertequals
Browse files Browse the repository at this point in the history
Let assertEquals be strict for assertSame
  • Loading branch information
damienalexandre authored Nov 21, 2022
2 parents 9d0b3cc + 2c75b78 commit 1147733
Show file tree
Hide file tree
Showing 17 changed files with 132 additions and 132 deletions.
8 changes: 4 additions & 4 deletions tests/JoliTypo/Tests/EnglishTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function testFixFullText()
$fixer = new Fixer($this->en_fixers);
$this->assertInstanceOf('JoliTypo\Fixer', $fixer);

$this->assertEquals(self::FIXED, $fixer->fix(self::TOFIX));
$this->assertSame(self::FIXED, $fixer->fix(self::TOFIX));
}

public function testReadMeExemple()
Expand All @@ -59,7 +59,7 @@ public function testReadMeExemple()

$fixer = new Fixer($this->en_fixers);
$this->assertInstanceOf('JoliTypo\Fixer', $fixer);
$this->assertEquals($after, $fixer->fix($before));
$this->assertSame($after, $fixer->fix($before));
}

public function testDoubleQuoteMess()
Expand All @@ -74,7 +74,7 @@ public function testDoubleQuoteMess()
$fixer = new Fixer($this->en_fixers);
$fixer->setLocale('en');
$this->assertInstanceOf('JoliTypo\Fixer', $fixer);
$this->assertEquals($fixed, $fixer->fix($to_fix));
$this->assertSame($fixed, $fixer->fix($to_fix));
}

public function testHtmlHeart()
Expand All @@ -89,6 +89,6 @@ public function testHtmlHeart()
$fixer = new Fixer($this->en_fixers);
$fixer->setLocale('en');
$this->assertInstanceOf('JoliTypo\Fixer', $fixer);
$this->assertEquals($fixed, $fixer->fix($to_fix));
$this->assertSame($fixed, $fixer->fix($to_fix));
}
}
16 changes: 8 additions & 8 deletions tests/JoliTypo/Tests/Fixer/CurlyQuoteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ public function testSimpleString()
$fixer = new Fixer\CurlyQuote();
$this->assertInstanceOf('JoliTypo\Fixer\CurlyQuote', $fixer);

$this->assertEquals('This text in which there is a quote: I’m SUPERMAN.', $fixer->fix("This text in which there is a quote: I'm SUPERMAN."));
$this->assertEquals('Swag’', $fixer->fix("Swag'"));
$this->assertEquals('Swag’ me.', $fixer->fix("Swag' me."));
$this->assertEquals('J’aime la typographie.', $fixer->fix("J'aime la typographie."));
$this->assertEquals('Qu’est ce que l’univers ?', $fixer->fix("Qu'est ce que l'univers ?"));
$this->assertSame('This text in which there is a quote: I’m SUPERMAN.', $fixer->fix("This text in which there is a quote: I'm SUPERMAN."));
$this->assertSame('Swag’', $fixer->fix("Swag'"));
$this->assertSame('Swag’ me.', $fixer->fix("Swag' me."));
$this->assertSame('J’aime la typographie.', $fixer->fix("J'aime la typographie."));
$this->assertSame('Qu’est ce que l’univers ?', $fixer->fix("Qu'est ce que l'univers ?"));
}

public function testFalsePositives()
{
$fixer = new Fixer\CurlyQuote();

$this->assertEquals("She’s 6' 10\".", $fixer->fix("She's 6' 10\"."));
$this->assertEquals('This is a time: 2"44\'.', $fixer->fix('This is a time: 2"44\'.'));
$this->assertEquals("Here is a crying smiley: :'(", $fixer->fix("Here is a crying smiley: :'("));
$this->assertSame("She’s 6' 10\".", $fixer->fix("She's 6' 10\"."));
$this->assertSame('This is a time: 2"44\'.', $fixer->fix('This is a time: 2"44\'.'));
$this->assertSame("Here is a crying smiley: :'(", $fixer->fix("Here is a crying smiley: :'("));
}
}
16 changes: 8 additions & 8 deletions tests/JoliTypo/Tests/Fixer/DashTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ public function testSimpleString()
$fixer = new Fixer\Dash();
$this->assertInstanceOf('JoliTypo\Fixer\Dash', $fixer);

$this->assertEquals('Test', $fixer->fix('Test'));
$this->assertEquals('M. Jackson: 1964' . Fixer::NDASH . '2009', $fixer->fix('M. Jackson: 1964-2009'));
$this->assertEquals('M. Jackson: 1964 ' . Fixer::NDASH . ' 2009', $fixer->fix('M. Jackson: 1964 - 2009'));
$this->assertEquals('Style ' . Fixer::NDASH . ' not sincerity ' . Fixer::NDASH . ' is the vital thing.', $fixer->fix('Style - not sincerity - is the vital thing.'));
// $this->assertEquals("Style ".Fixer::MDASH." not sincerity ".Fixer::MDASH." is the vital thing.", $fixer->fix("Style -not sincerity- is the vital thing."));
$this->assertSame('Test', $fixer->fix('Test'));
$this->assertSame('M. Jackson: 1964' . Fixer::NDASH . '2009', $fixer->fix('M. Jackson: 1964-2009'));
$this->assertSame('M. Jackson: 1964 ' . Fixer::NDASH . ' 2009', $fixer->fix('M. Jackson: 1964 - 2009'));
$this->assertSame('Style ' . Fixer::NDASH . ' not sincerity ' . Fixer::NDASH . ' is the vital thing.', $fixer->fix('Style - not sincerity - is the vital thing.'));
// $this->assertSame("Style ".Fixer::MDASH." not sincerity ".Fixer::MDASH." is the vital thing.", $fixer->fix("Style -not sincerity- is the vital thing."));

$this->assertEquals('Style' . Fixer::MDASH . 'you have it.', $fixer->fix('Style -- you have it.'));
$this->assertEquals('Style' . Fixer::MDASH . 'you have it.', $fixer->fix('Style--you have it.'));
$this->assertEquals('Style' . Fixer::MDASH . 'you have it.', $fixer->fix('Style-- you have it.'));
$this->assertSame('Style' . Fixer::MDASH . 'you have it.', $fixer->fix('Style -- you have it.'));
$this->assertSame('Style' . Fixer::MDASH . 'you have it.', $fixer->fix('Style--you have it.'));
$this->assertSame('Style' . Fixer::MDASH . 'you have it.', $fixer->fix('Style-- you have it.'));
}
}
16 changes: 8 additions & 8 deletions tests/JoliTypo/Tests/Fixer/DimensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ public function testSimpleString()
$fixer = new Fixer\Dimension();
$this->assertInstanceOf('JoliTypo\Fixer\Dimension', $fixer);

$this->assertEquals('Test', $fixer->fix('Test'));
$this->assertEquals('TestxTest', $fixer->fix('TestxTest'));
$this->assertEquals('Here is a calcul: 99' . Fixer::TIMES . '122.21', $fixer->fix('Here is a calcul: 99x122.21'));
$this->assertEquals('Here is a calcul: 99 ' . Fixer::TIMES . ' 122.21', $fixer->fix('Here is a calcul: 99 x 122.21'));
$this->assertEquals('Here is a calcul: 99 1212,32 ' . Fixer::TIMES . ' 122.21', $fixer->fix('Here is a calcul: 99 1212,32 x 122.21'));
$this->assertEquals('3 ' . Fixer::TIMES . ' 1', $fixer->fix('3 x 1'));
$this->assertEquals('8.5"' . Fixer::TIMES . '10"', $fixer->fix('8.5"x10"'));
$this->assertEquals('8.5" ' . Fixer::TIMES . ' 10"', $fixer->fix('8.5" x 10"'));
$this->assertSame('Test', $fixer->fix('Test'));
$this->assertSame('TestxTest', $fixer->fix('TestxTest'));
$this->assertSame('Here is a calcul: 99' . Fixer::TIMES . '122.21', $fixer->fix('Here is a calcul: 99x122.21'));
$this->assertSame('Here is a calcul: 99 ' . Fixer::TIMES . ' 122.21', $fixer->fix('Here is a calcul: 99 x 122.21'));
$this->assertSame('Here is a calcul: 99 1212,32 ' . Fixer::TIMES . ' 122.21', $fixer->fix('Here is a calcul: 99 1212,32 x 122.21'));
$this->assertSame('3 ' . Fixer::TIMES . ' 1', $fixer->fix('3 x 1'));
$this->assertSame('8.5"' . Fixer::TIMES . '10"', $fixer->fix('8.5"x10"'));
$this->assertSame('8.5" ' . Fixer::TIMES . ' 10"', $fixer->fix('8.5" x 10"'));
}
}
14 changes: 7 additions & 7 deletions tests/JoliTypo/Tests/Fixer/EllipsisTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ public function testSimpleString()
$fixer = new Fixer\Ellipsis();
$this->assertInstanceOf('JoliTypo\Fixer\Ellipsis', $fixer);

$this->assertEquals('Test', $fixer->fix('Test'));
$this->assertEquals('Test…', $fixer->fix('Test...'));
$this->assertEquals('Am I an ellipsis?', $fixer->fix('Am I an ellipsis?'));
$this->assertEquals('Am I an ellipsis..', $fixer->fix('Am I an ellipsis..'));
$this->assertEquals('Am I an ellipsis…', $fixer->fix('Am I an ellipsis....'));
$this->assertEquals('Am I an ellipsis…', $fixer->fix('Am I an ellipsis…'));
$this->assertEquals('Am I an ellipsis… With following text.', $fixer->fix('Am I an ellipsis... With following text.'));
$this->assertSame('Test', $fixer->fix('Test'));
$this->assertSame('Test…', $fixer->fix('Test...'));
$this->assertSame('Am I an ellipsis?', $fixer->fix('Am I an ellipsis?'));
$this->assertSame('Am I an ellipsis..', $fixer->fix('Am I an ellipsis..'));
$this->assertSame('Am I an ellipsis…', $fixer->fix('Am I an ellipsis....'));
$this->assertSame('Am I an ellipsis…', $fixer->fix('Am I an ellipsis…'));
$this->assertSame('Am I an ellipsis… With following text.', $fixer->fix('Am I an ellipsis... With following text.'));
}
}
12 changes: 6 additions & 6 deletions tests/JoliTypo/Tests/Fixer/EnglishQuotesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ public function testFalsePositives()
{
$fixer = new Fixer\EnglishQuotes();

$this->assertEquals('This is a time: 2"44\'.', $fixer->fix('This is a time: 2"44\'.'));
$this->assertEquals('2"44\'.', $fixer->fix('2"44\'.'));
$this->assertSame('This is a time: 2"44\'.', $fixer->fix('This is a time: 2"44\'.'));
$this->assertSame('2"44\'.', $fixer->fix('2"44\'.'));
}

protected function basicStringsAsserts($fixer)
{
$this->assertEquals('“I am smart”', $fixer->fix('"I am smart"'));
$this->assertEquals('Quote say: “I am smart”', $fixer->fix('Quote say: "I am smart"'));
$this->assertEquals("I'm not a “QUOTE”. Or a “US QUOTE.”", $fixer->fix('I\'m not a "QUOTE". Or a "US QUOTE."'));
$this->assertEquals("I'm not a (“QUOTE”. Or a “US QUOTE.”)", $fixer->fix('I\'m not a ("QUOTE". Or a "US QUOTE.")'));
$this->assertSame('“I am smart”', $fixer->fix('"I am smart"'));
$this->assertSame('Quote say: “I am smart”', $fixer->fix('Quote say: "I am smart"'));
$this->assertSame("I'm not a “QUOTE”. Or a “US QUOTE.”", $fixer->fix('I\'m not a "QUOTE". Or a "US QUOTE."'));
$this->assertSame("I'm not a (“QUOTE”. Or a “US QUOTE.”)", $fixer->fix('I\'m not a ("QUOTE". Or a "US QUOTE.")'));
}
}
20 changes: 10 additions & 10 deletions tests/JoliTypo/Tests/Fixer/FrenchNoBreakSpaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ public function testSimpleString()
$fixer = new Fixer\FrenchNoBreakSpace();
$this->assertInstanceOf('JoliTypo\Fixer\FrenchNoBreakSpace', $fixer);

$this->assertEquals('Superman' . Fixer::NO_BREAK_THIN_SPACE . '!', $fixer->fix('Superman !'));
$this->assertEquals('Superman' . Fixer::NO_BREAK_THIN_SPACE . '?', $fixer->fix('Superman ?'));
$this->assertEquals('Superman' . Fixer::NO_BREAK_THIN_SPACE . '!?', $fixer->fix('Superman !?'));
$this->assertEquals('Superman' . Fixer::NO_BREAK_THIN_SPACE . '? Nope.', $fixer->fix('Superman ? Nope.'));
$this->assertEquals('Superman' . Fixer::NO_BREAK_SPACE . ': the movie', $fixer->fix('Superman : the movie'));
$this->assertEquals('Superman: the movie', $fixer->fix('Superman: the movie'));
$this->assertEquals('Superman' . Fixer::NO_BREAK_THIN_SPACE . '; the movie', $fixer->fix('Superman ; the movie'));
$this->assertEquals('Superman' . Fixer::NO_BREAK_THIN_SPACE . '; the movie', $fixer->fix("Superman\u{a0}; the movie"));
$this->assertEquals('fdda:5cc1:23:4::1f', $fixer->fix('fdda:5cc1:23:4::1f'));
$this->assertSame('Superman' . Fixer::NO_BREAK_THIN_SPACE . '!', $fixer->fix('Superman !'));
$this->assertSame('Superman' . Fixer::NO_BREAK_THIN_SPACE . '?', $fixer->fix('Superman ?'));
$this->assertSame('Superman' . Fixer::NO_BREAK_THIN_SPACE . '!?', $fixer->fix('Superman !?'));
$this->assertSame('Superman' . Fixer::NO_BREAK_THIN_SPACE . '? Nope.', $fixer->fix('Superman ? Nope.'));
$this->assertSame('Superman' . Fixer::NO_BREAK_SPACE . ': the movie', $fixer->fix('Superman : the movie'));
$this->assertSame('Superman: the movie', $fixer->fix('Superman: the movie'));
$this->assertSame('Superman' . Fixer::NO_BREAK_THIN_SPACE . '; the movie', $fixer->fix('Superman ; the movie'));
$this->assertSame('Superman' . Fixer::NO_BREAK_THIN_SPACE . '; the movie', $fixer->fix("Superman\u{a0}; the movie"));
$this->assertSame('fdda:5cc1:23:4::1f', $fixer->fix('fdda:5cc1:23:4::1f'));

$this->assertEquals('Here is a brand name: Yahoo!', $fixer->fix('Here is a brand name: Yahoo!'));
$this->assertSame('Here is a brand name: Yahoo!', $fixer->fix('Here is a brand name: Yahoo!'));
}
}
16 changes: 8 additions & 8 deletions tests/JoliTypo/Tests/Fixer/FrenchQuotesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function testFalsePositives()
{
$fixer = new Fixer\FrenchQuotes();

$this->assertEquals('This is a time: 2"44\'.', $fixer->fix('This is a time: 2"44\'.'));
$this->assertSame('This is a time: 2"44\'.', $fixer->fix('This is a time: 2"44\'.'));
}

/**
Expand All @@ -44,18 +44,18 @@ public function testImpossible()

$fixer = new Fixer\FrenchQuotes();

$this->assertEquals('Oh my god, this quote is alone: " ! But those are «' . Fixer::NO_BREAK_SPACE . 'ok' . Fixer::NO_BREAK_SPACE . '».', $fixer->fix('Oh my god, this quote is alone: " ! But those are "ok".'));
$this->assertSame('Oh my god, this quote is alone: " ! But those are «' . Fixer::NO_BREAK_SPACE . 'ok' . Fixer::NO_BREAK_SPACE . '».', $fixer->fix('Oh my god, this quote is alone: " ! But those are "ok".'));
}

protected function basicStringsAsserts($fixer)
{
$this->assertEquals('«' . Fixer::NO_BREAK_SPACE . 'Good code is like a good joke.' . Fixer::NO_BREAK_SPACE . '»', $fixer->fix('"Good code is like a good joke."'));
$this->assertEquals('«' . Fixer::NO_BREAK_SPACE . 'Good code is like a Bieber.' . Fixer::NO_BREAK_SPACE . '» - said no ever, ever.', $fixer->fix('"Good code is like a Bieber." - said no ever, ever.'));
$this->assertSame('«' . Fixer::NO_BREAK_SPACE . 'Good code is like a good joke.' . Fixer::NO_BREAK_SPACE . '»', $fixer->fix('"Good code is like a good joke."'));
$this->assertSame('«' . Fixer::NO_BREAK_SPACE . 'Good code is like a Bieber.' . Fixer::NO_BREAK_SPACE . '» - said no ever, ever.', $fixer->fix('"Good code is like a Bieber." - said no ever, ever.'));

$this->assertEquals('Some people are like «' . Fixer::NO_BREAK_SPACE . 'Batman' . Fixer::NO_BREAK_SPACE . '», others like «' . Fixer::NO_BREAK_SPACE . 'Superman' . Fixer::NO_BREAK_SPACE . '».', $fixer->fix('Some people are like "Batman", others like "Superman".'));
$this->assertEquals('Oh my god, this quote is alone: " !', $fixer->fix('Oh my god, this quote is alone: " !'));
$this->assertSame('Some people are like «' . Fixer::NO_BREAK_SPACE . 'Batman' . Fixer::NO_BREAK_SPACE . '», others like «' . Fixer::NO_BREAK_SPACE . 'Superman' . Fixer::NO_BREAK_SPACE . '».', $fixer->fix('Some people are like "Batman", others like "Superman".'));
$this->assertSame('Oh my god, this quote is alone: " !', $fixer->fix('Oh my god, this quote is alone: " !'));

$this->assertEquals('Liste de «' . Fixer::NO_BREAK_SPACE . 'mot' . Fixer::NO_BREAK_SPACE . '» entre «' . Fixer::NO_BREAK_SPACE . 'guillemets' . Fixer::NO_BREAK_SPACE . '».', $fixer->fix('Liste de "mot" entre "guillemets".'));
$this->assertEquals('Liste de («' . Fixer::NO_BREAK_SPACE . 'mot' . Fixer::NO_BREAK_SPACE . '» entre «' . Fixer::NO_BREAK_SPACE . 'guillemets' . Fixer::NO_BREAK_SPACE . '»).', $fixer->fix('Liste de ("mot" entre "guillemets").'));
$this->assertSame('Liste de «' . Fixer::NO_BREAK_SPACE . 'mot' . Fixer::NO_BREAK_SPACE . '» entre «' . Fixer::NO_BREAK_SPACE . 'guillemets' . Fixer::NO_BREAK_SPACE . '».', $fixer->fix('Liste de "mot" entre "guillemets".'));
$this->assertSame('Liste de («' . Fixer::NO_BREAK_SPACE . 'mot' . Fixer::NO_BREAK_SPACE . '» entre «' . Fixer::NO_BREAK_SPACE . 'guillemets' . Fixer::NO_BREAK_SPACE . '»).', $fixer->fix('Liste de ("mot" entre "guillemets").'));
}
}
10 changes: 5 additions & 5 deletions tests/JoliTypo/Tests/Fixer/GermanQuotesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ public function testFalsePositives()
{
$fixer = new Fixer\GermanQuotes();

$this->assertEquals('This is a time: 2"44\'.', $fixer->fix('This is a time: 2"44\'.'));
$this->assertEquals('2"44\'.', $fixer->fix('2"44\'.'));
$this->assertSame('This is a time: 2"44\'.', $fixer->fix('This is a time: 2"44\'.'));
$this->assertSame('2"44\'.', $fixer->fix('2"44\'.'));
}

protected function basicStringsAsserts($fixer)
{
$this->assertEquals('„I am smart“', $fixer->fix('"I am smart"'));
$this->assertEquals('(„I am smart“)', $fixer->fix('("I am smart")'));
$this->assertEquals("Andreas fragte mich: „Hast du den Artikel 'EU-Erweiterung' gelesen?“", $fixer->fix('Andreas fragte mich: "Hast du den Artikel \'EU-Erweiterung\' gelesen?"'));
$this->assertSame('„I am smart“', $fixer->fix('"I am smart"'));
$this->assertSame('(„I am smart“)', $fixer->fix('("I am smart")'));
$this->assertSame("Andreas fragte mich: „Hast du den Artikel 'EU-Erweiterung' gelesen?“", $fixer->fix('Andreas fragte mich: "Hast du den Artikel \'EU-Erweiterung\' gelesen?"'));
}
}
14 changes: 7 additions & 7 deletions tests/JoliTypo/Tests/Fixer/HyphenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@ public function testSimpleString()
$fixer = new Fixer\Hyphen('fr');
$this->assertInstanceOf('JoliTypo\Fixer\Hyphen', $fixer);

$this->assertEquals('Test', $fixer->fix('Test'));
$this->assertEquals('Cordia' . Fixer::SHY . 'le' . Fixer::SHY . 'ment', $fixer->fix('Cordialement'));
$this->assertEquals('Cordia' . Fixer::SHY . 'le' . Fixer::SHY . 'ment' . Fixer::NO_BREAK_THIN_SPACE . '!', $fixer->fix('Cordialement' . Fixer::NO_BREAK_THIN_SPACE . '!'));
$this->assertSame('Test', $fixer->fix('Test'));
$this->assertSame('Cordia' . Fixer::SHY . 'le' . Fixer::SHY . 'ment', $fixer->fix('Cordialement'));
$this->assertSame('Cordia' . Fixer::SHY . 'le' . Fixer::SHY . 'ment' . Fixer::NO_BREAK_THIN_SPACE . '!', $fixer->fix('Cordialement' . Fixer::NO_BREAK_THIN_SPACE . '!'));
}

public function testLocaleFallback()
{
$fixer = new Fixer\Hyphen('fr_BE');
$this->assertInstanceOf('JoliTypo\Fixer\Hyphen', $fixer);

$this->assertEquals('Test', $fixer->fix('Test'));
$this->assertEquals('Cordia' . Fixer::SHY . 'le' . Fixer::SHY . 'ment', $fixer->fix('Cordialement'));
$this->assertSame('Test', $fixer->fix('Test'));
$this->assertSame('Cordia' . Fixer::SHY . 'le' . Fixer::SHY . 'ment', $fixer->fix('Cordialement'));
}

public function testNonExistingLocale()
{
$fixer = new Fixer\Hyphen('toto');

$this->assertEquals('Test', $fixer->fix('Test'));
$this->assertEquals('Cordialement', $fixer->fix('Cordialement'));
$this->assertSame('Test', $fixer->fix('Test'));
$this->assertSame('Cordialement', $fixer->fix('Cordialement'));
}
}
10 changes: 5 additions & 5 deletions tests/JoliTypo/Tests/Fixer/NoSpaceBeforeCommaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ public function testSimpleString()
$fixer = new Fixer\NoSpaceBeforeComma();
$this->assertInstanceOf('JoliTypo\Fixer\NoSpaceBeforeComma', $fixer);

$this->assertEquals("Superman, you're my hero", $fixer->fix("Superman,you're my hero"));
$this->assertEquals("Superman, you're my hero", $fixer->fix("Superman ,you're my hero"));
$this->assertEquals("Superman, you're my hero", $fixer->fix("Superman , you're my hero"));
$this->assertEquals('F, bar', $fixer->fix('F,bar'));
$this->assertEquals('Seule 1,7 million de personnes', $fixer->fix('Seule 1,7 million de personnes'));
$this->assertSame("Superman, you're my hero", $fixer->fix("Superman,you're my hero"));
$this->assertSame("Superman, you're my hero", $fixer->fix("Superman ,you're my hero"));
$this->assertSame("Superman, you're my hero", $fixer->fix("Superman , you're my hero"));
$this->assertSame('F, bar', $fixer->fix('F,bar'));
$this->assertSame('Seule 1,7 million de personnes', $fixer->fix('Seule 1,7 million de personnes'));
}
}
6 changes: 3 additions & 3 deletions tests/JoliTypo/Tests/Fixer/SmartQuotesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ public function testSimpleString()
$fixer = new Fixer\SmartQuotes('de');
$this->assertInstanceOf('JoliTypo\Fixer\SmartQuotes', $fixer);

$this->assertEquals('„I am smart“', $fixer->fix('"I am smart"'));
$this->assertSame('„I am smart“', $fixer->fix('"I am smart"'));

$fixer->setOpening('«');
$fixer->setClosing('»');

$this->assertEquals('«I am smart»', $fixer->fix('"I am smart"'));
$this->assertSame('«I am smart»', $fixer->fix('"I am smart"'));

$fixer->setOpening('<');
$fixer->setClosing('>');

$this->assertEquals('<I am smart>', $fixer->fix('"I am smart"'));
$this->assertSame('<I am smart>', $fixer->fix('"I am smart"'));
}

public function testBadConfig()
Expand Down
Loading

0 comments on commit 1147733

Please sign in to comment.