From 06dd570d5830cd289ce5e54d2004aff262fb06eb Mon Sep 17 00:00:00 2001 From: celyes Date: Sat, 25 Jul 2020 18:30:14 +0100 Subject: [PATCH 01/23] add test: ar_DZ/AddressTest.php --- test/Faker/Provider/ar_DZ/AddressTest.php | 75 +++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 test/Faker/Provider/ar_DZ/AddressTest.php diff --git a/test/Faker/Provider/ar_DZ/AddressTest.php b/test/Faker/Provider/ar_DZ/AddressTest.php new file mode 100644 index 0000000000..47cee00de4 --- /dev/null +++ b/test/Faker/Provider/ar_DZ/AddressTest.php @@ -0,0 +1,75 @@ +addProvider(new Address($faker)); + $this->faker = $faker; + } + + public function testCity() + { + $city = $this->faker->city(); + $this->assertNotEmpty($city); + $this->assertInternalType('string', $city); + } + /** + * + */ + public function testCityPrefix() + { + $CityPrefix = $this->faker->CityPrefix(); + $this->assertNotEmpty($CityPrefix); + $this->assertInternalType('string', $CityPrefix); + } + + public function testWilaya() + { + $wilaya = $this->faker->state(); + $this->assertNotEmpty($wilaya); + $this->assertInternalType('string', $wilaya); + } + + public function testPostCode() + { + $postcode = $this->faker->postcode(); + $this->assertNotEmpty($postcode); + $this->assertInternalType('integer', $postcode); + $this->assertRegExp('/^[1-4]?[0-9]000$/', (string) $postcode); + } + + public function testAddressName() + { + $address = $this->faker->address(); + $this->assertInternalType('string', $address); + var_dump($address); + } + + public function testSecondaryAddress() + { + $secondaryAdress = $this->faker->secondaryAddress(); + $this->assertNotEmpty($secondaryAdress); + $this->assertInternalType('string', $secondaryAdress); + } + + public function testCountry() + { + $country = $this->faker->country(); + $this->assertNotEmpty($country); + $this->assertInternalType('string', $country); + } + +} From 1e6ecd566631b0f6530f19dc48c0980c39530f79 Mon Sep 17 00:00:00 2001 From: celyes Date: Sat, 25 Jul 2020 18:30:41 +0100 Subject: [PATCH 02/23] add new file: ar_DZ/Address.php --- src/Faker/Provider/ar_DZ/Address.php | 120 +++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 src/Faker/Provider/ar_DZ/Address.php diff --git a/src/Faker/Provider/ar_DZ/Address.php b/src/Faker/Provider/ar_DZ/Address.php new file mode 100644 index 0000000000..4439639881 --- /dev/null +++ b/src/Faker/Provider/ar_DZ/Address.php @@ -0,0 +1,120 @@ + Date: Sat, 25 Jul 2020 19:15:15 +0100 Subject: [PATCH 03/23] fix typo --- src/Faker/Provider/ar_DZ/Address.php | 18 +++++++++--------- test/Faker/Provider/ar_DZ/AddressTest.php | 7 +++---- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/Faker/Provider/ar_DZ/Address.php b/src/Faker/Provider/ar_DZ/Address.php index 4439639881..910bdafa01 100644 --- a/src/Faker/Provider/ar_DZ/Address.php +++ b/src/Faker/Provider/ar_DZ/Address.php @@ -9,7 +9,7 @@ class Address extends \Faker\Provider\Address 'عين', 'بو', 'بن', 'حاسي', 'باب', 'آيت', 'سيدي', 'وادي', 'واد', 'راس', ); protected static $streetSuffix = array( - 'مفترق طرق', 'ممشى', 'ممر', 'شارع', 'زقاق', 'جسر', 'طريق', + 'شارع', 'حي', 'طريق', 'ممر', 'زقاق', ); protected static $buildingNumber = array('####', '###', '##'); @@ -29,11 +29,11 @@ class Address extends \Faker\Provider\Address ); protected static $postcode = array( - 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, - 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, - 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 28000, 29000, - 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, 38000, 39000, - 40000, 41000, 42000, 43000, 44000, 45000, 46000, 47000, 48000); + '1000', '2000', '3000', '4000', '5000', '6000', '7000', '8000', '9000', '10000', + '11000', '12000', '13000', '14000', '15000', '16000', '17000', '18000', '19000', + '20000', '21000', '22000', '23000', '24000', '25000', '26000', '27000', '28000', '29000', + '30000', '31000', '32000', '33000', '34000', '35000', '36000', '37000', '38000', '39000', + '40000', '41000', '42000', '43000', '44000', '45000', '46000', '47000', '48000'); protected static $country = array( 'الكاريبي', 'أمريكا الوسطى', 'أنتيجوا وبربودا', 'أنجولا', 'أنجويلا', 'أندورا', 'اندونيسيا', 'أورجواي', 'أوروبا', 'أوزبكستان', 'أوغندا', 'أوقيانوسيا', 'أوقيانوسيا النائية', 'أوكرانيا', 'ايران', 'أيرلندا', 'أيسلندا', 'ايطاليا', @@ -68,15 +68,15 @@ class Address extends \Faker\Provider\Address ); protected static $streetAddressFormats = array( - '{{streetName}} {{buildingNumber}} {{secondaryAddress}}', + '{{buildingNumber}} {{secondaryAddress}} {{streetName}}', ); protected static $addressFormats = array( - "{{streetAddress}}\n{{city}}", + "{{streetAddress}} - {{city}}", ); protected static $secondaryAddressFormats = array( - 'باب رقم ##', 'عمارة رقم ##', 'بناية رقم ##', + 'باب رقم ##', 'بناية رقم ##', ); /** diff --git a/test/Faker/Provider/ar_DZ/AddressTest.php b/test/Faker/Provider/ar_DZ/AddressTest.php index 47cee00de4..553198d690 100644 --- a/test/Faker/Provider/ar_DZ/AddressTest.php +++ b/test/Faker/Provider/ar_DZ/AddressTest.php @@ -47,15 +47,14 @@ public function testPostCode() { $postcode = $this->faker->postcode(); $this->assertNotEmpty($postcode); - $this->assertInternalType('integer', $postcode); - $this->assertRegExp('/^[1-4]?[0-9]000$/', (string) $postcode); + $this->assertInternalType('string', $postcode); + $this->assertRegExp('/^[1-4]?[0-9]000$/', $postcode); } - public function testAddressName() + public function testAddress() { $address = $this->faker->address(); $this->assertInternalType('string', $address); - var_dump($address); } public function testSecondaryAddress() From f4c18d9e1ac220ccdb1b903ae268d86f0bac6f31 Mon Sep 17 00:00:00 2001 From: celyes Date: Sun, 26 Jul 2020 16:40:34 +0100 Subject: [PATCH 04/23] add new test: PersonTest --- test/Faker/Provider/ar_DZ/PersonTest.php | 55 ++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 test/Faker/Provider/ar_DZ/PersonTest.php diff --git a/test/Faker/Provider/ar_DZ/PersonTest.php b/test/Faker/Provider/ar_DZ/PersonTest.php new file mode 100644 index 0000000000..a43caf7e56 --- /dev/null +++ b/test/Faker/Provider/ar_DZ/PersonTest.php @@ -0,0 +1,55 @@ +addProvider(new Person($faker)); + $this->faker = $faker; + } + + public function testTitle() + { + $title = $this->faker->title(); + $this->assertNotEmpty($title); + $this->assertInternalType('string', $title); + } + public function testPersonFullName() + { + $name = $this->faker->name; + $this->assertNotEmpty($name); + $this->assertInternalType('string', $name); + } + + public function testPersonMaleName() + { + $name = $this->faker->firstNameMale; + $this->assertNotEmpty($name); + $this->assertInternalType('string', $name); + } + public function testPersonFemaleName() + { + $name = $this->faker->firstNameFemale; + $this->assertNotEmpty($name); + $this->assertInternalType('string', $name); + } + + public function testPersonPrefix() + { + $prefix = $this->faker->prefix; + $this->assertNotEmpty($prefix); + $this->assertInternalType('string', $prefix); + } +} From 82c51889a4e9423dca73d5e3e99ef0a02e16c5f1 Mon Sep 17 00:00:00 2001 From: celyes Date: Sun, 26 Jul 2020 16:40:56 +0100 Subject: [PATCH 05/23] add new provider: ar_DZ/Person --- src/Faker/Provider/ar_DZ/Person.php | 127 ++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 src/Faker/Provider/ar_DZ/Person.php diff --git a/src/Faker/Provider/ar_DZ/Person.php b/src/Faker/Provider/ar_DZ/Person.php new file mode 100644 index 0000000000..255dfaa86a --- /dev/null +++ b/src/Faker/Provider/ar_DZ/Person.php @@ -0,0 +1,127 @@ + Date: Sun, 26 Jul 2020 16:44:30 +0100 Subject: [PATCH 06/23] fix incorrect comment --- src/Faker/Provider/ar_DZ/Person.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Faker/Provider/ar_DZ/Person.php b/src/Faker/Provider/ar_DZ/Person.php index 255dfaa86a..21fae9dad7 100644 --- a/src/Faker/Provider/ar_DZ/Person.php +++ b/src/Faker/Provider/ar_DZ/Person.php @@ -22,7 +22,7 @@ class Person extends \Faker\Provider\Person ); /** - * @link http://muslim-names.us/ + * */ protected static $firstNameMale = array( 'محمد', 'يوسف', 'أبوبكر', 'بوعمامة', 'سعيد', 'ادريس', 'ارسلان', 'سليمان', @@ -52,7 +52,7 @@ class Person extends \Faker\Provider\Person ); /** - * @link http://muslim-names.us/ + * */ protected static $firstNameFemale = array( 'خديجة', 'سعيدة', 'آلاء', 'آية', 'أبرار', 'أحلام', 'أروى', 'أريج', 'أسماء', 'أسيل', 'أصاله', 'أفنان', 'ألاء', 'أماني', 'أمل', 'أمال', 'أميرة', 'أنوار', From b515ec1df4497ff203d89b0d03b32c15f0b07eae Mon Sep 17 00:00:00 2001 From: celyes Date: Mon, 27 Jul 2020 16:06:05 +0100 Subject: [PATCH 07/23] add new test: ColorTest --- test/Faker/Provider/ar_DZ/ColorTest.php | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 test/Faker/Provider/ar_DZ/ColorTest.php diff --git a/test/Faker/Provider/ar_DZ/ColorTest.php b/test/Faker/Provider/ar_DZ/ColorTest.php new file mode 100644 index 0000000000..d4dc723a0a --- /dev/null +++ b/test/Faker/Provider/ar_DZ/ColorTest.php @@ -0,0 +1,31 @@ +addProvider(new Color($faker)); + $this->faker = $faker; + } + + public function testColorName() + { + $color = $this->faker->colorName; + $this->assertNotEmpty($color); + $this->assertInternalType('string', $color); + } + + public function testSafeColorName() + { + $safeColor = $this->faker->safeColorName; + $this->assertNotEmpty($safeColor); + $this->assertInternalType('string', $safeColor); + } +} From 15e146d088fa0a378d176758cfee43ddf91c5155 Mon Sep 17 00:00:00 2001 From: celyes Date: Mon, 27 Jul 2020 16:06:43 +0100 Subject: [PATCH 08/23] add new provider: ar_DZ/Color --- src/Faker/Provider/ar_DZ/Color.php | 81 ++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 src/Faker/Provider/ar_DZ/Color.php diff --git a/src/Faker/Provider/ar_DZ/Color.php b/src/Faker/Provider/ar_DZ/Color.php new file mode 100644 index 0000000000..a060ef07da --- /dev/null +++ b/src/Faker/Provider/ar_DZ/Color.php @@ -0,0 +1,81 @@ + Date: Mon, 27 Jul 2020 16:07:44 +0100 Subject: [PATCH 09/23] modify docblock comments --- src/Faker/Provider/ar_DZ/Person.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Faker/Provider/ar_DZ/Person.php b/src/Faker/Provider/ar_DZ/Person.php index 21fae9dad7..63c5622f0d 100644 --- a/src/Faker/Provider/ar_DZ/Person.php +++ b/src/Faker/Provider/ar_DZ/Person.php @@ -22,7 +22,7 @@ class Person extends \Faker\Provider\Person ); /** - * + * @example توفيق */ protected static $firstNameMale = array( 'محمد', 'يوسف', 'أبوبكر', 'بوعمامة', 'سعيد', 'ادريس', 'ارسلان', 'سليمان', @@ -52,7 +52,7 @@ class Person extends \Faker\Provider\Person ); /** - * + * @example إلهام */ protected static $firstNameFemale = array( 'خديجة', 'سعيدة', 'آلاء', 'آية', 'أبرار', 'أحلام', 'أروى', 'أريج', 'أسماء', 'أسيل', 'أصاله', 'أفنان', 'ألاء', 'أماني', 'أمل', 'أمال', 'أميرة', 'أنوار', From c3e7cd970f06b641eb86496cb999124d6ccde139 Mon Sep 17 00:00:00 2001 From: celyes Date: Mon, 27 Jul 2020 16:40:40 +0100 Subject: [PATCH 10/23] add new test: ar_DZ/PhoneNumberTest --- test/Faker/Provider/ar_DZ/PhoneNumberTest.php | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 test/Faker/Provider/ar_DZ/PhoneNumberTest.php diff --git a/test/Faker/Provider/ar_DZ/PhoneNumberTest.php b/test/Faker/Provider/ar_DZ/PhoneNumberTest.php new file mode 100644 index 0000000000..7d269de6ee --- /dev/null +++ b/test/Faker/Provider/ar_DZ/PhoneNumberTest.php @@ -0,0 +1,28 @@ +addProvider(new PhoneNumber($faker)); + $this->faker = $faker; + } + + public function testPhoneNumberIsValidForAlgeria() + { + $phoneNumber = $this->faker->phoneNumber(); + $this->assertNotNull($phoneNumber); + } +} From 5a6b0353076f5e03922842dee39a4f51c3dc9e09 Mon Sep 17 00:00:00 2001 From: celyes Date: Mon, 27 Jul 2020 16:41:11 +0100 Subject: [PATCH 11/23] add new provider: ar_DZ/PhoneNumber --- src/Faker/Provider/ar_DZ/PhoneNumber.php | 56 ++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/Faker/Provider/ar_DZ/PhoneNumber.php diff --git a/src/Faker/Provider/ar_DZ/PhoneNumber.php b/src/Faker/Provider/ar_DZ/PhoneNumber.php new file mode 100644 index 0000000000..7a1e4ddadd --- /dev/null +++ b/src/Faker/Provider/ar_DZ/PhoneNumber.php @@ -0,0 +1,56 @@ + Date: Tue, 28 Jul 2020 12:55:15 +0100 Subject: [PATCH 12/23] add new test: ar_DZ/TextTest --- test/Faker/Provider/ar_DZ/TextTest.php | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 test/Faker/Provider/ar_DZ/TextTest.php diff --git a/test/Faker/Provider/ar_DZ/TextTest.php b/test/Faker/Provider/ar_DZ/TextTest.php new file mode 100644 index 0000000000..5657c21d8b --- /dev/null +++ b/test/Faker/Provider/ar_DZ/TextTest.php @@ -0,0 +1,31 @@ +addProvider(new Text($faker)); + $this->faker = $faker; + } + + public function testIfRealTextIsGeneratedCorrectly() + { + $realText = $this->faker->realText; + $this->assertNotNull($realText); + $this->assertInternalType('string', $realText); + $this->assertRegExp('/\p{Arabic}+/u', $realText); + } + +} From e08564c67b3351970a5ef1bfc9a869e94f7a1772 Mon Sep 17 00:00:00 2001 From: celyes Date: Tue, 28 Jul 2020 12:55:40 +0100 Subject: [PATCH 13/23] add new provider: ar_DZ/Text --- src/Faker/Provider/ar_DZ/Text.php | 271 ++++++++++++++++++++++++++++++ 1 file changed, 271 insertions(+) create mode 100644 src/Faker/Provider/ar_DZ/Text.php diff --git a/src/Faker/Provider/ar_DZ/Text.php b/src/Faker/Provider/ar_DZ/Text.php new file mode 100644 index 0000000000..3536df1052 --- /dev/null +++ b/src/Faker/Provider/ar_DZ/Text.php @@ -0,0 +1,271 @@ + Date: Tue, 28 Jul 2020 13:27:41 +0100 Subject: [PATCH 14/23] add new test: ar_DZ/PaymentTest --- test/Faker/Provider/ar_DZ/PaymentTest.php | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 test/Faker/Provider/ar_DZ/PaymentTest.php diff --git a/test/Faker/Provider/ar_DZ/PaymentTest.php b/test/Faker/Provider/ar_DZ/PaymentTest.php new file mode 100644 index 0000000000..b914ddf232 --- /dev/null +++ b/test/Faker/Provider/ar_DZ/PaymentTest.php @@ -0,0 +1,38 @@ +addProvider(new Payment($faker)); + $faker->addProvider(new Person($faker)); + $faker->addProvider(new DateTime($faker)); + $this->faker = $faker; + } + public function testifIBANisValid() + { + $iban = $this->faker->iban('DZ'); + $this->assertNotNull($iban); + } + + public function testCreditCardDetails() + { + $details = $this->faker->creditCardDetails(); + $this->assertNotEmpty($details); + $this->assertInternalType('array', $details); + } +} From 1bdab36cbb06536d0ba991284fda08ff9fff1aae Mon Sep 17 00:00:00 2001 From: celyes Date: Tue, 28 Jul 2020 13:28:02 +0100 Subject: [PATCH 15/23] add new provider: ar_DZ/Payment --- src/Faker/Provider/ar_DZ/Payment.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/Faker/Provider/ar_DZ/Payment.php diff --git a/src/Faker/Provider/ar_DZ/Payment.php b/src/Faker/Provider/ar_DZ/Payment.php new file mode 100644 index 0000000000..9777c94d8c --- /dev/null +++ b/src/Faker/Provider/ar_DZ/Payment.php @@ -0,0 +1,19 @@ + Date: Tue, 28 Jul 2020 13:28:22 +0100 Subject: [PATCH 16/23] add new test: ar_DZ/InternetTest --- test/Faker/Provider/ar_DZ/InternetTest.php | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 test/Faker/Provider/ar_DZ/InternetTest.php diff --git a/test/Faker/Provider/ar_DZ/InternetTest.php b/test/Faker/Provider/ar_DZ/InternetTest.php new file mode 100644 index 0000000000..e508de09ae --- /dev/null +++ b/test/Faker/Provider/ar_DZ/InternetTest.php @@ -0,0 +1,42 @@ +addProvider(new Internet($faker)); + $this->faker = $faker; + } + + public function testEmailIsValid() + { + $email = $this->faker->email(); + $this->assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); + } + + public function testUserNameIsValid() + { + $userName = $this->faker->userName; + $this->assertNotNull($userName); + } + + public function testDomainName() + { + $domain = 'http://' . $this->faker->domainName; + $this->assertNotFalse(filter_var($domain, FILTER_VALIDATE_URL)); + + } +} From 69fad3ec6f7cfa6c89c387e7105372d4fa2a012d Mon Sep 17 00:00:00 2001 From: celyes Date: Tue, 28 Jul 2020 13:28:38 +0100 Subject: [PATCH 17/23] add new provider: ar_DZ/Internet --- src/Faker/Provider/ar_DZ/Internet.php | 57 +++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/Faker/Provider/ar_DZ/Internet.php diff --git a/src/Faker/Provider/ar_DZ/Internet.php b/src/Faker/Provider/ar_DZ/Internet.php new file mode 100644 index 0000000000..238a3e934f --- /dev/null +++ b/src/Faker/Provider/ar_DZ/Internet.php @@ -0,0 +1,57 @@ +generator->parse($format)); + } + + /** + * @example 'wewebit.jo' + */ + public function domainName() + { + return static::randomElement(static::$lastNameAscii) . '.' . $this->tld(); + } +} From 116eb16bf90a8abeaea8049d103cb642022e6747 Mon Sep 17 00:00:00 2001 From: celyes Date: Tue, 28 Jul 2020 15:35:25 +0100 Subject: [PATCH 18/23] add new test: ar_DZ/CompanyTest --- test/Faker/Provider/ar_DZ/CompanyTest.php | 37 +++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 test/Faker/Provider/ar_DZ/CompanyTest.php diff --git a/test/Faker/Provider/ar_DZ/CompanyTest.php b/test/Faker/Provider/ar_DZ/CompanyTest.php new file mode 100644 index 0000000000..690d10ccd7 --- /dev/null +++ b/test/Faker/Provider/ar_DZ/CompanyTest.php @@ -0,0 +1,37 @@ +addProvider(new Company($faker)); + $faker->addProvider(new Person($faker)); + $this->faker = $faker; + } + + public function testIfCatchPhraseIsCatchy() + { + $catchPhrase = $this->faker->catchPhrase(); + $this->assertNotNull($catchPhrase); + $this->assertInternalType('string', $catchPhrase); + } + public function testJobTitle() + { + $job = $this->faker->jobTitle; + $this->assertInternalType('string', $job); + $this->assertRegExp('/^\p{Arabic}+/u', $job); + } +} From 55707506d7213485027b7f6ac76b89a31f053ab2 Mon Sep 17 00:00:00 2001 From: celyes Date: Tue, 28 Jul 2020 15:35:50 +0100 Subject: [PATCH 19/23] add new provider: ar_DZ/Company --- src/Faker/Provider/ar_DZ/Company.php | 113 +++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 src/Faker/Provider/ar_DZ/Company.php diff --git a/src/Faker/Provider/ar_DZ/Company.php b/src/Faker/Provider/ar_DZ/Company.php new file mode 100644 index 0000000000..06678c9d9a --- /dev/null +++ b/src/Faker/Provider/ar_DZ/Company.php @@ -0,0 +1,113 @@ + Date: Tue, 28 Jul 2020 16:03:52 +0100 Subject: [PATCH 20/23] add new test: ar_DZ/CompanyTest --- test/Faker/Provider/ar_DZ/CompanyTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Faker/Provider/ar_DZ/CompanyTest.php b/test/Faker/Provider/ar_DZ/CompanyTest.php index 690d10ccd7..bc92a346ad 100644 --- a/test/Faker/Provider/ar_DZ/CompanyTest.php +++ b/test/Faker/Provider/ar_DZ/CompanyTest.php @@ -31,6 +31,7 @@ public function testIfCatchPhraseIsCatchy() public function testJobTitle() { $job = $this->faker->jobTitle; + $this->assertNotNull($job); $this->assertInternalType('string', $job); $this->assertRegExp('/^\p{Arabic}+/u', $job); } From 4016eba01a8054aa1d184ce0505405c32e8fe613 Mon Sep 17 00:00:00 2001 From: celyes Date: Tue, 28 Jul 2020 16:04:38 +0100 Subject: [PATCH 21/23] add new provider: ar_DZ/Company --- src/Faker/Provider/ar_DZ/Company.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Faker/Provider/ar_DZ/Company.php b/src/Faker/Provider/ar_DZ/Company.php index 06678c9d9a..149dbe8c38 100644 --- a/src/Faker/Provider/ar_DZ/Company.php +++ b/src/Faker/Provider/ar_DZ/Company.php @@ -56,7 +56,7 @@ class Company extends \Faker\Provider\Company protected static $catchPhraseWords = array( array('الخدمات', 'الحلول', 'الانظمة'), array( - 'الذكية', 'المتطورة', 'المتقدمة', 'الدولية', 'المتخصص,', 'السريعة', + 'الذكية', 'المتطورة', 'المتقدمة', 'الدولية', 'المتخصصة', 'السريعة', 'الابداعية', 'المتكاملة', 'المتغيرة', 'المثالية', ), ); From bcb6fb7c92e74b66654a84e8415263126255b7cf Mon Sep 17 00:00:00 2001 From: celyes Date: Tue, 28 Jul 2020 16:05:24 +0100 Subject: [PATCH 22/23] add new area for readme: Algeria (ar_DZ) --- readme.md | 183 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 122 insertions(+), 61 deletions(-) diff --git a/readme.md b/readme.md index cd22c155f9..f700d13bc2 100644 --- a/readme.md +++ b/readme.md @@ -11,31 +11,11 @@ Faker is heavily inspired by Perl's [Data::Faker](http://search.cpan.org/~jasonk Faker requires PHP >= 5.3.3. - # Table of Contents - [Installation](#installation) - [Basic Usage](#basic-usage) -- [Formatters](#formatters) - - [Base](#fakerproviderbase) - - [Lorem Ipsum Text](#fakerproviderlorem) - - [Person](#fakerprovideren_usperson) - - [Address](#fakerprovideren_usaddress) - - [Phone Number](#fakerprovideren_usphonenumber) - - [Company](#fakerprovideren_uscompany) - - [Real Text](#fakerprovideren_ustext) - - [Date and Time](#fakerproviderdatetime) - - [Internet](#fakerproviderinternet) - - [User Agent](#fakerprovideruseragent) - - [Payment](#fakerproviderpayment) - - [Color](#fakerprovidercolor) - - [File](#fakerproviderfile) - - [Image](#fakerproviderimage) - - [Uuid](#fakerprovideruuid) - - [Barcode](#fakerproviderbarcode) - - [Miscellaneous](#fakerprovidermiscellaneous) - - [Biased](#fakerproviderbiased) - - [Html Lorem](#fakerproviderhtmllorem) +- [Formatters](#formatters) - [Base](#fakerproviderbase) - [Lorem Ipsum Text](#fakerproviderlorem) - [Person](#fakerprovideren_usperson) - [Address](#fakerprovideren_usaddress) - [Phone Number](#fakerprovideren_usphonenumber) - [Company](#fakerprovideren_uscompany) - [Real Text](#fakerprovideren_ustext) - [Date and Time](#fakerproviderdatetime) - [Internet](#fakerproviderinternet) - [User Agent](#fakerprovideruseragent) - [Payment](#fakerproviderpayment) - [Color](#fakerprovidercolor) - [File](#fakerproviderfile) - [Image](#fakerproviderimage) - [Uuid](#fakerprovideruuid) - [Barcode](#fakerproviderbarcode) - [Miscellaneous](#fakerprovidermiscellaneous) - [Biased](#fakerproviderbiased) - [Html Lorem](#fakerproviderhtmllorem) - [Modifiers](#modifiers) - [Localization](#localization) - [Populating Entities Using an ORM or an ODM](#populating-entities-using-an-orm-or-an-odm) @@ -46,7 +26,6 @@ Faker requires PHP >= 5.3.3. - [Third-Party Libraries Extending/Based On Faker](#third-party-libraries-extendingbased-on-faker) - [License](#license) - ## Installation ```sh @@ -58,6 +37,7 @@ composer require fzaninotto/faker ### Autoloading Faker supports both `PSR-0` as `PSR-4` autoloaders. + ```php name; // 'Jess Mraz I'; > $faker->realText($faker->numberBetween(10,20)); > ``` - - ## Faker Internals: Understanding Providers A `Faker\Generator` alone can't do much generation. It needs `Faker\Provider` objects to delegate the data generation to them. `Faker\Factory::create()` actually creates a `Faker\Generator` bundled with the default providers. Here is what happens under the hood: @@ -535,7 +515,7 @@ $faker->addProvider(new Faker\Provider\en_US\PhoneNumber($faker)); $faker->addProvider(new Faker\Provider\en_US\Company($faker)); $faker->addProvider(new Faker\Provider\Lorem($faker)); $faker->addProvider(new Faker\Provider\Internet($faker)); -```` +``` Whenever you try to access a property on the `$faker` object, the generator looks for a method with the same name in all the providers attached to it. For instance, calling `$faker->name` triggers a call to `Faker\Provider\Person::name()`. And since Faker starts with the last provider, you can easily override existing formatters: just add a provider containing methods named after the formatters you want to override. @@ -782,6 +762,86 @@ Fugiat non in itaque sunt nobis totam. Sed nesciunt est deleniti cumque alias. R ## Language specific formatters +### `Faker\Provider\ar_DZ\Person` + +```php +name; // شوية إلياس +``` + +### `Faker\Provider\ar_DZ\Payment` + +```php +bankAccountNumber // "DZ0218IBYZVZJSEC8536V4XC" +``` + +### `Faker\Provider\ar_DZ\Address` + +```php +city; // "الجلفة" +echo $faker->postcode; // 17000 +echo $faker->country // "الوﻻيات المتحدة الأمريكية" +``` + +### `Faker\Provider\ar_DZ\Color` + +```php +colorName; // "أخضر غامق" +``` + +### `Faker\Provider\ar_DZ\Company` + +```php +catchPhrase; // "الحلول المتقدمة" +echo $faker->company; // "شركة الخدمات المتخصصة" +echo $faker->jobTitle; // "مهندس برمجيات" +``` + +### Faker\Provider\ar_DZ\Internet + +```php +domainName; // "domain.dz" +echo $faker->userName; // "ilyes.chouia55" +``` + +### Faker\Provider\ar_DZ\PhoneNumber + +```php +phoneNumber; // 0566778899 || 027939999 +echo $faker->areaCode; // 27 +``` + +### Faker\Provider\ar_DZ\Text + +```php +realText; // "إن الإقليم الرابع اعدل بقاع الأرض" +echo $faker->areaCode; // 27 +``` + +### Faker\Provider\ar_DZ\Internet + +```php +domainName; // "domain.dz" +echo $faker->userName; // "ilyes.chouia55" +``` + ### `Faker\Provider\ar_SA\Person` ```php @@ -824,7 +884,7 @@ echo $faker->vat(false); // "BG0123456789" - unspaced Bulgarian Value Added T ```php region; // "Liberecký kraj" +echo $faker->city; // "Liberecký kraj" ``` ### `Faker\Provider\cs_CZ\Company` @@ -887,6 +947,7 @@ echo $faker->p; // "5398237590" ``` ### `Faker\Provider\de_CH\Person` + ```php taxpayerIdentificationNumber; // 'J1234567891' ``` ### `Faker\Provider\fr_CH\Person` + ```php mobileNumber; // +33 6 21 12 72 84 echo $faker->serviceNumber // 08 98 04 84 46 ``` - ### `Faker\Provider\he_IL\Payment` ```php @@ -1258,6 +1319,7 @@ echo $faker->nik(); // "8522246001570940" ``` ### `Faker\Provider\it_CH\Person` + ```php personalIdentityNumber() // '950910-0799' //Since the numbers are different for male and female persons, optionally you can specify gender. echo $faker->personalIdentityNumber('female') // '950910-0781' ``` + ### `Faker\Provider\tr_TR\Person` ```php @@ -1723,7 +1786,6 @@ echo $faker->tcNo // '55300634882' ``` - ### `Faker\Provider\zh_CN\Payment` ```php @@ -1760,40 +1822,39 @@ echo $faker->personalIdentityNumber; // A223456789 echo $faker->VAT; //23456789 ``` - ## Third-Party Libraries Extending/Based On Faker -* Symfony bundles: - * [`willdurand/faker-bundle`](https://github.com/willdurand/BazingaFakerBundle): Put the awesome Faker library into the Symfony2 DIC and populate your database with fake data. - * [`hautelook/alice-bundle`](https://github.com/hautelook/AliceBundle), [`h4cc/alice-fixtures-bundle`](https://github.com/h4cc/AliceFixturesBundle): Bundles for using [`nelmio/alice`](https://packagist.org/packages/nelmio/alice) and Faker with data fixtures. Able to use Doctrine ORM as well as Doctrine MongoDB ODM. -* [`emanueleminotto/faker-service-provider`](https://github.com/EmanueleMinotto/FakerServiceProvider): Faker Service Provider for Silex -* [`bit3/faker-cli`](https://github.com/bit3/faker-cli): Command Line Tool for the Faker PHP library -* [`league/factory-muffin`](https://github.com/thephpleague/factory-muffin): enable the rapid creation of objects (PHP port of factory-girl) -* [`fzaninotto/company-name-generator`](https://github.com/fzaninotto/CompanyNameGenerator): Generate names for English tech companies with class -* [`emanueleminotto/faker-placehold-it-provider`](https://github.com/EmanueleMinotto/PlaceholdItProvider): Generate images using placehold.it -* [`spyrit/datalea`](https://github.com/spyrit/datalea) A highly customizable random test data generator web app -* [`frequenc1/newage-ipsum`](https://github.com/frequenc1/newage-ipsum): A new aged ipsum provider for the faker library inspired by http://sebpearce.com/bullshit/ -* [`prewk/xml-faker`](https://github.com/prewk/xml-faker): Create fake XML with Faker -* [`denheck/faker-context`](https://github.com/denheck/faker-context): Behat context using Faker to generate testdata -* [`swekaj/cron-expression-generator`](https://github.com/swekaj/CronExpressionGenerator): Faker provider for generating random, valid cron expressions. -* [`pragmafabrik/pomm-faker`](https://github.com/pragmafabrik/Pomm2Faker): Faker client for Pomm database framework (PostgreSQL) -* [`nelmio/alice`](https://github.com/nelmio/alice): Fixtures/object generator with a yaml DSL that can use Faker as data generator. -* [`ravage84/cakephp-fake-seeder`](https://github.com/ravage84/cakephp-fake-seeder) A CakePHP 2.x shell to seed your database with fake and/or fixed data. -* [`bheller/images-generator`](https://github.com/bruceheller/images-generator): An image generator provider using GD for placeholder type pictures -* [`pattern-lab/plugin-faker`](https://github.com/pattern-lab/plugin-php-faker): Pattern Lab is a Styleguide, Component Library, and Prototyping tool. This creates unique content each time Pattern Lab is generated. -* [`guidocella/eloquent-populator`](https://github.com/guidocella/eloquent-populator): Adapter for Laravel's Eloquent ORM. -* [`tamperdata/exiges`](https://github.com/tamperdata/exiges): Faker provider for generating random temperatures -* [`jzonta/faker-restaurant`](https://github.com/jzonta/FakerRestaurant): Faker for Food and Beverage names generate -* [`aalaap/faker-youtube`](https://github.com/aalaap/faker-youtube): Faker for YouTube URLs in various formats -* [`pelmered/fake-car`](https://github.com/pelmered/fake-car): Faker for cars and car data -* [`bluemmb/faker-picsum-photos-provider`](https://github.com/bluemmb/Faker-PicsumPhotos): Generate images using [picsum.photos](http://picsum.photos/) -* [`er1z/fakemock`](https://github.com/er1z/fakemock): Generate mocks using class-configuration and detection via Faker's guesser and Symfony asserts -* [`xvladqt/faker-lorem-flickr`](https://github.com/xvladxtremal/Faker-LoremFlickr): Generate images using [loremflickr.com](http://loremflickr.com/) -* [`metrakit/faker-eddy-malou`](https://github.com/Metrakit/faker-eddy-malou): Generate French Eddy Malou sentences & paragraphs -* [`drupol/belgian-national-number-faker`](https://github.com/drupol/belgian-national-number-faker): Generate fake Belgian national numbers -* [`elgentos/masquerade`](https://github.com/elgentos/masquerade): Configuration-based, platform-agnostic, locale-compatible data faker tool (out-of-the-box support for Magento 2) -* [`ottaviano/faker-gravatar`](https://github.com/ottaviano/faker-gravatar): Generate avatars using [Gravatar](https://en.gravatar.com/site/implement/images/) -* [`finwe/phpstan-faker`](https://github.com/finwe/phpstan-faker): PHPStan extension for Faker methods +- Symfony bundles: + - [`willdurand/faker-bundle`](https://github.com/willdurand/BazingaFakerBundle): Put the awesome Faker library into the Symfony2 DIC and populate your database with fake data. + - [`hautelook/alice-bundle`](https://github.com/hautelook/AliceBundle), [`h4cc/alice-fixtures-bundle`](https://github.com/h4cc/AliceFixturesBundle): Bundles for using [`nelmio/alice`](https://packagist.org/packages/nelmio/alice) and Faker with data fixtures. Able to use Doctrine ORM as well as Doctrine MongoDB ODM. +- [`emanueleminotto/faker-service-provider`](https://github.com/EmanueleMinotto/FakerServiceProvider): Faker Service Provider for Silex +- [`bit3/faker-cli`](https://github.com/bit3/faker-cli): Command Line Tool for the Faker PHP library +- [`league/factory-muffin`](https://github.com/thephpleague/factory-muffin): enable the rapid creation of objects (PHP port of factory-girl) +- [`fzaninotto/company-name-generator`](https://github.com/fzaninotto/CompanyNameGenerator): Generate names for English tech companies with class +- [`emanueleminotto/faker-placehold-it-provider`](https://github.com/EmanueleMinotto/PlaceholdItProvider): Generate images using placehold.it +- [`spyrit/datalea`](https://github.com/spyrit/datalea) A highly customizable random test data generator web app +- [`frequenc1/newage-ipsum`](https://github.com/frequenc1/newage-ipsum): A new aged ipsum provider for the faker library inspired by http://sebpearce.com/bullshit/ +- [`prewk/xml-faker`](https://github.com/prewk/xml-faker): Create fake XML with Faker +- [`denheck/faker-context`](https://github.com/denheck/faker-context): Behat context using Faker to generate testdata +- [`swekaj/cron-expression-generator`](https://github.com/swekaj/CronExpressionGenerator): Faker provider for generating random, valid cron expressions. +- [`pragmafabrik/pomm-faker`](https://github.com/pragmafabrik/Pomm2Faker): Faker client for Pomm database framework (PostgreSQL) +- [`nelmio/alice`](https://github.com/nelmio/alice): Fixtures/object generator with a yaml DSL that can use Faker as data generator. +- [`ravage84/cakephp-fake-seeder`](https://github.com/ravage84/cakephp-fake-seeder) A CakePHP 2.x shell to seed your database with fake and/or fixed data. +- [`bheller/images-generator`](https://github.com/bruceheller/images-generator): An image generator provider using GD for placeholder type pictures +- [`pattern-lab/plugin-faker`](https://github.com/pattern-lab/plugin-php-faker): Pattern Lab is a Styleguide, Component Library, and Prototyping tool. This creates unique content each time Pattern Lab is generated. +- [`guidocella/eloquent-populator`](https://github.com/guidocella/eloquent-populator): Adapter for Laravel's Eloquent ORM. +- [`tamperdata/exiges`](https://github.com/tamperdata/exiges): Faker provider for generating random temperatures +- [`jzonta/faker-restaurant`](https://github.com/jzonta/FakerRestaurant): Faker for Food and Beverage names generate +- [`aalaap/faker-youtube`](https://github.com/aalaap/faker-youtube): Faker for YouTube URLs in various formats +- [`pelmered/fake-car`](https://github.com/pelmered/fake-car): Faker for cars and car data +- [`bluemmb/faker-picsum-photos-provider`](https://github.com/bluemmb/Faker-PicsumPhotos): Generate images using [picsum.photos](http://picsum.photos/) +- [`er1z/fakemock`](https://github.com/er1z/fakemock): Generate mocks using class-configuration and detection via Faker's guesser and Symfony asserts +- [`xvladqt/faker-lorem-flickr`](https://github.com/xvladxtremal/Faker-LoremFlickr): Generate images using [loremflickr.com](http://loremflickr.com/) +- [`metrakit/faker-eddy-malou`](https://github.com/Metrakit/faker-eddy-malou): Generate French Eddy Malou sentences & paragraphs +- [`drupol/belgian-national-number-faker`](https://github.com/drupol/belgian-national-number-faker): Generate fake Belgian national numbers +- [`elgentos/masquerade`](https://github.com/elgentos/masquerade): Configuration-based, platform-agnostic, locale-compatible data faker tool (out-of-the-box support for Magento 2) +- [`ottaviano/faker-gravatar`](https://github.com/ottaviano/faker-gravatar): Generate avatars using [Gravatar](https://en.gravatar.com/site/implement/images/) +- [`finwe/phpstan-faker`](https://github.com/finwe/phpstan-faker): PHPStan extension for Faker methods ## License From 75a318803c61c64eea13b0a6175dd2bc1d6355b1 Mon Sep 17 00:00:00 2001 From: celyes Date: Tue, 28 Jul 2020 16:15:21 +0100 Subject: [PATCH 23/23] fix class naming error --- test/Faker/Provider/ar_DZ/PaymentTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Faker/Provider/ar_DZ/PaymentTest.php b/test/Faker/Provider/ar_DZ/PaymentTest.php index b914ddf232..8f74cd3e79 100644 --- a/test/Faker/Provider/ar_DZ/PaymentTest.php +++ b/test/Faker/Provider/ar_DZ/PaymentTest.php @@ -8,7 +8,7 @@ use Faker\Provider\DateTime; use PHPUnit\Framework\TestCase; -final class InternetTest extends TestCase +final class PaymentTest extends TestCase { /** * @var Generator