-
Notifications
You must be signed in to change notification settings - Fork 1
/
ConverterTest.php
35 lines (33 loc) · 1.01 KB
/
ConverterTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
class ConverterTest extends PHPUnit_Framework_TestCase
{
public function testConverterFiftynineMinute(){
$convert = new Converter("00:59:00");
$this->assertEquals(60*59,$convert->toSecond());
}
public function testConverterOneHour()
{
$converter = new Converter("01:00:00");
$this->assertEquals(3600, $converter->tosecond());
}
public function testConverterOneMinute()
{
$converter = new Converter("00:01:00");
$this->assertEquals(60, $converter->toSecond());
}
public function testConverterFiftynineSecond()
{
$converter = new Converter("00:00:59");
$this->assertEquals(59, $converter->toSecond());
}
public function testConverterElevenSecond()
{
$converter = new Converter("00:00:11");
$this->assertEquals(11, $converter->toSecond());
}
public function testConverterTenSecond()
{
$converter = new Converter("00:00:10");
$this->assertEquals(10, $converter->toSecond());
}
}