| Total Complexity | 5 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class PhoneFormatterTest extends PHPUnit_Framework_TestCase |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * If no valid number - just pass it though |
||
| 19 | */ |
||
| 20 | public function testNoValidPhone() |
||
| 21 | { |
||
| 22 | $phone = 58465; |
||
| 23 | $result = PhoneFormatter::format($phone); |
||
| 24 | $this->assertEquals($phone, $result); |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Format 11 digits number |
||
| 29 | */ |
||
| 30 | public function testPhone11Digits() |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Create link with 11 digits number |
||
| 39 | */ |
||
| 40 | public function testPhone11DigitsLink() |
||
| 41 | { |
||
| 42 | $phone = 79208498755; |
||
| 43 | $result = PhoneFormatter::a($phone); |
||
| 44 | $this->assertEquals("<a href=\"tel:+{$phone}\">+7 (920) 849-87-55</a>", $result); |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Format 12 digits number |
||
| 49 | */ |
||
| 50 | public function testPhone12Digits() |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Create link with 11 digits number |
||
| 59 | */ |
||
| 60 | public function testPhone12DigitsLink() |
||
| 65 | } |
||
| 66 | |||
| 67 | |||
| 68 | } |