Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Added en_AU unit test folder #767

Merged
merged 2 commits into from
Feb 23, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions test/Faker/Provider/en_AU/PhoneNumberTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace Faker\Test\Provider\en_AU;

use Faker\Generator;
use Faker\Provider\en_AU\PhoneNumber;

class PhoneNumberTest extends \PHPUnit_Framework_TestCase
{

/**
* @var Generator
*/
private $faker;

public function setUp()
{
$faker = new Generator();
$faker->addProvider(new PhoneNumber($faker));
$this->faker = $faker;
}

public function testPhoneNumberCanReturnData()
{
$number = $this->faker->phoneNumber;
$this->assertNotEmpty($number);
}

public function testPhoneNumberFormat()
{
$number = $this->faker->phoneNumber;
$this->assertRegExp('/^(?:\+?61|0)[2-478](?:[ -]?[0-9]){8}$/', $number);
}
}