ÿØÿà JFIF H H ÿÛ C ÿÛ Cÿ " ÿÄ ÿÄ ÿÚ ±5¬€ ÿÄ àÿÚ ÿÄ ÀÿÚ ? ÿÄ ÀÿÚ ? ÿÄ àÿÚ ? ÿÄ àÿÚ ?! ÿÚ ÿÄ ÀÿÚ ? ÿÄ ÀÿÚ ? ÿÄ àÿÚ ? ÿÙ
| Server IP : 160.25.81.117 / Your IP : 216.73.216.137 Web Server : Apache/2 System : Linux sv05.hilab.cloud 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : bellizen ( 1045) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/bellizen/public_html/vendor/fzaninotto/faker/test/Faker/Provider/en_SG/ |
Upload File : |
<?php
namespace Faker\Test\Provider\en_SG;
use Faker\Factory;
use Faker\Provider\en_SG\PhoneNumber;
class PhoneNumberTest extends \PHPUnit_Framework_TestCase
{
public function setUp()
{
$faker = Factory::create('en_SG');
$faker->addProvider(new PhoneNumber($faker));
$this->faker = $faker;
}
// http://en.wikipedia.org/wiki/Telephone_numbers_in_Singapore#Numbering_plan
// y means 0 to 8 only
// x means 0 to 9
public function testMobilePhoneNumberStartWith9Returns9yxxxxxx()
{
$startsWith9 = false;
while (!$startsWith9) {
$mobileNumber = $this->faker->mobileNumber();
$startsWith9 = preg_match('/^(\+65|65)?\s*9/', $mobileNumber);
}
$this->assertRegExp('/^(\+65|65)?\s*9\s*[0-8]{3}\s*\d{4}$/', $mobileNumber);
}
// http://en.wikipedia.org/wiki/Telephone_numbers_in_Singapore#Numbering_plan
// z means 1 to 9 only
// x means 0 to 9
public function testMobilePhoneNumberStartWith7Or8Returns7Or8zxxxxxx()
{
$startsWith7Or8 = false;
while (!$startsWith7Or8) {
$mobileNumber = $this->faker->mobileNumber();
$startsWith7Or8 = preg_match('/^(\+65|65)?\s*[7-8]/', $mobileNumber);
}
$this->assertRegExp('/^(\+65|65)?\s*[7-8]\s*[1-9]{3}\s*\d{4}$/', $mobileNumber);
}
}