Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @test
- * @dataProvider berlinClockProvider
- */
- public function mixedTestCases($input_time, $expected_result)
- {
- $transformer = new Transformer;
- $result = $transformer->fromDigitalToBerlin($input_time);
- $this->assertEquals($expected_result, $result, "Something went wrong with cases provided by berlinClockProvider");
- }
- public function berlinClockProvider()
- {
- return [
- [
- '00:00:00',
- [
- 'seconds' => '1',
- 'hours_5x' => '0000',
- 'hours_1x' => '0000',
- 'minutes_5x' => '00000000000',
- 'minutes_1x' => '0000'
- ]
- ],
- [
- '17:23:45',
- [
- 'seconds' => '0',
- 'hours_5x' => '1110',
- 'hours_1x' => '1100',
- 'minutes_5x' => '11110000000',
- 'minutes_1x' => '1110'
- ]
- ],
- [
- '04:59:59',
- [
- 'seconds' => '0',
- 'hours_5x' => '0000',
- 'hours_1x' => '1111',
- 'minutes_5x' => '11111111111',
- 'minutes_1x' => '1111',
- ]
- ]
- ];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement