✏️ 正在编辑: FormatPhoneTest.php
路径:
/srv/systems_dir/biblioteca_yuppie/tests/library/Yuppie/View/Helper/FormatPhoneTest.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Yuppie_View_Helper_FormatPhoneTest extends PHPUnit_Framework_TestCase { protected $helper; protected function setUp() { $this->helper = new Yuppie_View_Helper_FormatPhone(); } public function testFormatarTelefoneCom8Digitos() { $this->assertEquals('3507-0700', $this->helper->formatPhone('35070700')); } public function testFormatarTelefoneCom8DigitosComDdd() { $this->assertEquals('(83) 3507-0700', $this->helper->formatPhone('8335070700')); } public function testFormatarTelefoneCom8DigitosComDdi() { $this->assertEquals('(+55 83) 3507-0700', $this->helper->formatPhone('558335070700')); } public function testFormatarTelefoneCom9Digitos() { $this->assertEquals('93507-0700', $this->helper->formatPhone('935070700')); } public function testFormatarTelefoneCom9DigitosComDdd() { $this->assertEquals('(83) 93507-0700', $this->helper->formatPhone('83935070700')); } public function testFormatarTelefoneInvalido() { $this->assertEquals('123321', $this->helper->formatPhone('(1)23-321')); } }
💾 保存文件
← 返回文件管理器