✏️ 正在编辑: DateFormatTest.php
路径:
/srv/systems_dir/biblioteca_yuppie/tests/library/Yuppie/View/Helper/DateFormatTest.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Yuppie_View_Helper_DateFormatTest extends PHPUnit_Framework_TestCase { private $helper; protected function setUp() { $this->helper = new Yuppie_View_Helper_DateFormat(); } public function testConverterFormatoDeBancoDeDadosParaPadrao() { $this->assertEquals('11/08/2014', $this->helper->dateFormat('2014-08-11')); $this->assertEquals('11/08/2014', $this->helper->dateFormat('2014-08-11 20:10:05')); } public function testConverterFormatoDeBancoDeDadosParaFormatoEspecifico() { $this->assertEquals('11/08/2014 20:10', $this->helper->dateFormat('2014-08-11 20:10:05', 'dd/MM/yyyy HH:mm')); } public function testRetornaNullSeDataForZerada() { $this->assertNull($this->helper->dateFormat('0000-00-00')); } }
💾 保存文件
← 返回文件管理器