Skip to content

Commit

Permalink
testing tests v8
Browse files Browse the repository at this point in the history
  • Loading branch information
wUFr committed Dec 11, 2024
1 parent 9519002 commit 400ced5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/TranslatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ public function testBasedOnNumber()
public function testThxText()
{
$translator = new Translator(dir: "./tests/locales/", lang: "en_US");
$this->assertEquals('Thank you John for buying a piece of apple', $translator->locale('testValues', 'thxText', ['username' => 'John', 'product' => 'apple']));
$this->assertEquals('Thank you John for buying apple', $translator->locale('testValues', 'thxText', ['username' => 'John', 'product' => 'apple']));
}

public function testThxTextCounter()
{
$translator = new Translator(dir: "./tests/locales/", lang: "en_US");
$this->assertEquals('Thank you John for buying a piece of apple', $translator->locale('testValues', 'thxTextCounter', ['username' => 'John', 'product' => 'apple', '_counter' => 1]));
$this->assertEquals('Thank you John for buying two of apple', $translator->locale('testValues', 'thxTextCounter', ['username' => 'John', 'product' => 'apple', '_counter' => 2]));
$this->assertEquals('Thank you John for buying 50 pieces of apple', $translator->locale('testValues', 'thxTextCounter', ['username' => 'John', 'product' => 'apple', '_counter' => 50]));
$this->assertEquals('Thank you John for buying 50 pieces of apple', $translator->locale('testValues', 'thxTextCounter', ['username' => 'John', 'product' => 'apple', 'count' => 50 , '_counter' => 50]));
}
}

0 comments on commit 400ced5

Please sign in to comment.