コード例 #1
0
 /**
  * @test
  */
 public function formatNumberWithDecimalsDecimalPointAndSeparator()
 {
     $this->assertEquals('3.333,333', $this->fixture->render(3, ',', '.'));
 }
コード例 #2
0
 /**
  * @param $errorCode
  * @param $expectedString
  * @test
  * @dataProvider errorCodesDataProvider
  */
 public function renderPhpCodesCorrectly($errorCode, $expectedString)
 {
     $actualString = $this->viewHelper->render($errorCode);
     $this->assertEquals($expectedString, $actualString);
 }
コード例 #3
0
 /**
  * @test
  */
 public function renderUsesChildNodesIfValueArgumentIsOmitted()
 {
     $this->viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(12345));
     $actualResult = $this->viewHelper->render();
     $this->assertEquals('12 KB', $actualResult);
 }