diff --git a/src/Faker/Provider/fr_FR/Company.php b/src/Faker/Provider/fr_FR/Company.php index 089c50e3..0e4a7227 100644 --- a/src/Faker/Provider/fr_FR/Company.php +++ b/src/Faker/Provider/fr_FR/Company.php @@ -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. diff --git a/test/Faker/Provider/fr_FR/CompanyTest.php b/test/Faker/Provider/fr_FR/CompanyTest.php index 190ea5ff..0b68d56f 100644 --- a/test/Faker/Provider/fr_FR/CompanyTest.php +++ b/test/Faker/Provider/fr_FR/CompanyTest.php @@ -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); + } +} \ No newline at end of file