Advertisement
Guest User

Berlin

a guest
Apr 19th, 2015
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. /**
  2. * @test
  3. * @dataProvider berlinClockProvider
  4. */
  5. public function mixedTestCases($input_time, $expected_result)
  6. {
  7. $transformer = new Transformer;
  8. $result = $transformer->fromDigitalToBerlin($input_time);
  9.  
  10. $this->assertEquals($expected_result, $result, "Something went wrong with cases provided by berlinClockProvider");
  11. }
  12.  
  13. public function berlinClockProvider()
  14. {
  15. return [
  16. [
  17. '00:00:00',
  18. [
  19. 'seconds' => '1',
  20. 'hours_5x' => '0000',
  21. 'hours_1x' => '0000',
  22. 'minutes_5x' => '00000000000',
  23. 'minutes_1x' => '0000'
  24. ]
  25. ],
  26. [
  27. '17:23:45',
  28. [
  29. 'seconds' => '0',
  30. 'hours_5x' => '1110',
  31. 'hours_1x' => '1100',
  32. 'minutes_5x' => '11110000000',
  33. 'minutes_1x' => '1110'
  34. ]
  35. ],
  36. [
  37. '04:59:59',
  38. [
  39. 'seconds' => '0',
  40. 'hours_5x' => '0000',
  41. 'hours_1x' => '1111',
  42. 'minutes_5x' => '11111111111',
  43. 'minutes_1x' => '1111',
  44. ]
  45. ]
  46. ];
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement