TextTest.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace Faker\Test\Provider\kk_KZ;
  3. use PHPUnit\Framework\TestCase;
  4. class TextTest extends TestCase
  5. {
  6. private $textClass;
  7. public function setUp()
  8. {
  9. $this->textClass = new \ReflectionClass('Faker\Provider\kk_KZ\Text');
  10. }
  11. protected function getMethod($name) {
  12. $method = $this->textClass->getMethod($name);
  13. $method->setAccessible(true);
  14. return $method;
  15. }
  16. /** @test */
  17. function testItShouldAppendEndPunctToTheEndOfString()
  18. {
  19. $this->assertSame(
  20. 'Арыстан баб кесенесі - көне Отырар.',
  21. $this->getMethod('appendEnd')->invokeArgs(null, array('Арыстан баб кесенесі - көне Отырар '))
  22. );
  23. $this->assertSame(
  24. 'Арыстан баб кесенесі - көне Отырар.',
  25. $this->getMethod('appendEnd')->invokeArgs(null, array('Арыстан баб кесенесі - көне Отырар— '))
  26. );
  27. $this->assertSame(
  28. 'Арыстан баб кесенесі - көне Отырар.',
  29. $this->getMethod('appendEnd')->invokeArgs(null, array('Арыстан баб кесенесі - көне Отырар, '))
  30. );
  31. $this->assertSame(
  32. 'Арыстан баб кесенесі - көне Отырар!.',
  33. $this->getMethod('appendEnd')->invokeArgs(null, array('Арыстан баб кесенесі - көне Отырар! '))
  34. );
  35. $this->assertSame(
  36. 'Арыстан баб кесенесі - көне Отырар.',
  37. $this->getMethod('appendEnd')->invokeArgs(null, array('Арыстан баб кесенесі - көне Отырар: '))
  38. );
  39. $this->assertSame(
  40. 'Арыстан баб кесенесі - көне Отырар.',
  41. $this->getMethod('appendEnd')->invokeArgs(null, array('Арыстан баб кесенесі - көне Отырар; '))
  42. );
  43. }
  44. }