Skip to content

Commit

Permalink
Fixing failures in the test file
Browse files Browse the repository at this point in the history
  • Loading branch information
tadeobarranco authored and AlexWorking committed Mar 20, 2018
1 parent bda63c7 commit cb04f93
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,24 @@ public function testPostCodesThrowsExceptionIfCountryDoesNotExist()
/**
* @dataProvider getCanadaInvalidPostCodes
*/
public function testInvalidCanadaZipCode($countryId, $invalidPostCode) {
public function testInvalidCanadaZipCode($countryId, $invalidPostCode)
{
$this->assertFalse($this->validator->validate($invalidPostCode, $countryId));
}

/**
* @dataProvider getCanadaValidPostCodes
*/
public function testValidCanadaZipCode($countryId, $validPostCode) {
public function testValidCanadaZipCode($countryId, $validPostCode)
{
$this->assertTrue($this->validator->validate($validPostCode, $countryId));
}

/**
* @return array
*/
public function getCanadaInvalidPostCodes() {
public function getCanadaInvalidPostCodes()
{
return [
['countryId' => 'CA', 'postcode' => '12345'],
['countryId' => 'CA', 'postcode' => 'A1B2C3D'],
Expand All @@ -71,7 +74,8 @@ public function getCanadaInvalidPostCodes() {
/**
* @return array
*/
public function getCanadaValidPostCodes() {
public function getCanadaValidPostCodes()
{
return [
['countryId' => 'CA', 'postcode' => 'A1B2C3'],
['countryId' => 'CA', 'postcode' => 'A1B 2C3'],
Expand Down

0 comments on commit cb04f93

Please sign in to comment.