コード例 #1
0
 /**
  * @param mixed $value
  *
  * @return integer
  */
 public function convert($value)
 {
     return intval(parent::convert($value));
 }
コード例 #2
0
 /**
  * Tests convert().
  *
  * @param double $expected The expected double.
  * @param string $input    The input string.
  *
  * @test
  * @dataProvider provideTestConvert
  */
 public function testConvert($expected, $input)
 {
     $converter = new StringToDoubleConverter();
     $this->assertEquals($expected, $converter->convert($input));
 }