diff --git a/src/Faker/Provider/kk_KZ/Company.php b/src/Faker/Provider/kk_KZ/Company.php index 56b002a349..f8f8d159ea 100644 --- a/src/Faker/Provider/kk_KZ/Company.php +++ b/src/Faker/Provider/kk_KZ/Company.php @@ -52,7 +52,7 @@ public static function companyNameSuffix() /** * National Business Identification Numbers * - * @link http://egov.kz/wps/portal/!utWCM/p/b1/04_Sj9Q1MjAwsDQ1s9CP0I_KSyzLTE8syczPS8wB8aPM4oO8PE2cnAwdDSxMw4wMHE08nZ2CA0KDXcwMgQoikRUYWIY4gxS4hwU4mRkbGBgTp98AB3A0IKQ_XD8KVQkWF4AV4LHCzyM_N1U_uKhUPzcqx83SU9cRANth_Rk!/dl4/d5/L0lHSkovd0RNQU5rQUVnQSEhLzRKVUUvZW4!/ + * @link http://egov.kz/wps/portal/Content?contentPath=%2Fegovcontent%2Fbus_business%2Ffor_businessmen%2Farticle%2Fbusiness_identification_number&lang=en * @param \DateTime $registrationDate * @return string 12 digits, like 150140000019 */ diff --git a/src/Faker/Provider/kk_KZ/Person.php b/src/Faker/Provider/kk_KZ/Person.php index 3eca4a5c83..0009d91b59 100644 --- a/src/Faker/Provider/kk_KZ/Person.php +++ b/src/Faker/Provider/kk_KZ/Person.php @@ -136,7 +136,7 @@ class Person extends \Faker\Provider\Person /** * National Individual Identification Numbers * - * @link http://egov.kz/wps/portal/!utWCM/p/b1/04_Sj9S1tDAwMzY1NjLTj9CPykssy0xPLMnMz0vMAfGjzOKDvDxNnJwMHQ0sTMOMDBxNPJ2dggNCg13MDIEKIpEVGFiGOIMUuIcFOJkZGxgYE6ffAAdwNCCkP1w_ClUJFheAFeCxws8jPzdVPzcqx83SU9cRADxWbyg!/dl4/d5/L0lDUmlTUSEhL3dHa0FKRnNBLzRKVXFDQSEhL2Vu/ + * @link http://egov.kz/wps/portal/Content?contentPath=%2Fegovcontent%2Fcitizen_migration%2Fpassport_id_card%2Farticle%2Fiin_info&lang=en * @param \DateTime $birthDate * @return string 12 digits, like 780322300455 */ diff --git a/test/Faker/Provider/kk_KZ/CompanyTest.php b/test/Faker/Provider/kk_KZ/CompanyTest.php new file mode 100644 index 0000000000..779e73a61f --- /dev/null +++ b/test/Faker/Provider/kk_KZ/CompanyTest.php @@ -0,0 +1,31 @@ +faker = new Generator(); + + $this->faker->addProvider(new Company($this->faker)); + } + + public function testBusinessIdentificationNumberIsValid() + { + $registrationDate = new \DateTime('now'); + $businessIdentificationNumber = $this->faker->businessIdentificationNumber($registrationDate); + $registrationDateAsString = $registrationDate->format('ym'); + + $this->assertRegExp( + "/^(" . $registrationDateAsString . ")([4-6]{1})([0-3]{1})(\\d{6})$/", + $businessIdentificationNumber + ); + } +} diff --git a/test/Faker/Provider/kk_KZ/PersonTest.php b/test/Faker/Provider/kk_KZ/PersonTest.php new file mode 100644 index 0000000000..48e65683e5 --- /dev/null +++ b/test/Faker/Provider/kk_KZ/PersonTest.php @@ -0,0 +1,31 @@ +faker = new Generator(); + + $this->faker->addProvider(new Person($this->faker)); + } + + public function testIndividualIdentificationNumberIsValid() + { + $birthDate = new \DateTime('now'); + $individualIdentificationNumber = $this->faker->individualIdentificationNumber($birthDate); + $birthDateAsString = $birthDate->format('ymd'); + + $this->assertRegExp( + "/^(" . $birthDateAsString . ")([1-6]{1})(\\d{5})$/", + $individualIdentificationNumber + ); + } +}