mirror of
https://github.com/fzaninotto/Faker.git
synced 2025-03-22 16:29:55 +01:00
Fix broken unit tests by b502129bd10799c15eae4e991bdb44b6f6500d8b
Refs #97
This commit is contained in:
parent
1b7f8bd3b5
commit
a3ae3c9a43
@ -195,7 +195,7 @@ class Company extends \Faker\Provider\Company
|
||||
/**
|
||||
* @var array An array containing string which should not appear twice in a catch phrase.
|
||||
*/
|
||||
private static $wordsWhichShouldNotAppearTwice = array('sécurité', 'simpl');
|
||||
protected static $wordsWhichShouldNotAppearTwice = array('sécurité', 'simpl');
|
||||
|
||||
/**
|
||||
* Validates a french catch phrase.
|
||||
|
@ -25,7 +25,7 @@ class CompanyTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$siret = Company::siret(-1);
|
||||
|
||||
$this->assertThat($siret, self :: isValidSiret());
|
||||
$this->assertThat($siret, self::isValidSiret());
|
||||
$this->assertRegExp("/[\d]{3} [\d]{3} [\d]{3} 00[\d]{3}/", $siret);
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ class CompanyTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$siret = Company::siret(6);
|
||||
|
||||
$this->assertThat($siret, self :: isValidSiret());
|
||||
$this->assertThat($siret, self::isValidSiret());
|
||||
$this->assertRegExp("/[\d]{3} [\d]{3} [\d]{3} 00[\d]{3}/", $siret);
|
||||
}
|
||||
|
||||
@ -64,15 +64,23 @@ class CompanyTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testCatchPhraseValidationReturnsFalse()
|
||||
{
|
||||
$isCatchPhraseValid = Company::isCatchPhraseValid('La sécurité de rouler en toute sécurité');
|
||||
$isCatchPhraseValid = TestableCompany::isCatchPhraseValid('La sécurité de rouler en toute sécurité');
|
||||
|
||||
$this->assertFalse($isCatchPhraseValid);
|
||||
}
|
||||
|
||||
public function testCatchPhraseValidationReturnsTrue()
|
||||
{
|
||||
$isCatchPhraseValid = Company::isCatchPhraseValid('La sécurité de rouler en toute simplicité');
|
||||
$isCatchPhraseValid = TestableCompany::isCatchPhraseValid('La sécurité de rouler en toute simplicité');
|
||||
|
||||
$this->assertTrue($isCatchPhraseValid);
|
||||
}
|
||||
}
|
||||
|
||||
class TestableCompany extends Company
|
||||
{
|
||||
public static function isCatchPhraseValid($catchPhrase)
|
||||
{
|
||||
return parent::isCatchPhraseValid($catchPhrase);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user