Advertisement
sanjiisan

Untitled

Sep 6th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. <?php
  2.  
  3. require __DIR__ . '/../zadanie2.php';
  4.  
  5. use PHPUnit\Framework\TestCase;
  6.  
  7. class NumberTest extends TestCase
  8. {
  9. public function testLeap()
  10. {
  11.  
  12. $this->assertEquals(
  13. 'trzynaście',
  14. numToTxt(13)
  15. );
  16.  
  17. $this->assertEquals(
  18. 'zero',
  19. numToTxt(0)
  20. );
  21.  
  22.  
  23. $this->assertFalse(
  24. numToTxt('Kubuś')
  25. );
  26. }
  27.  
  28. public function testLeap2()
  29. {
  30. $this->assertEquals(
  31. 'sto dwadzieścia trzy',
  32. numToTxt(123)
  33. );
  34.  
  35. $this->assertFalse(
  36. numToTxt(1001)
  37. );
  38.  
  39. $this->assertEquals(
  40. 'jeden',
  41. numToTxt(1)
  42. );
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement