mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-26 04:39:09 -04:00
Include Vendor
This commit is contained in:
31
vendor/fzaninotto/faker/test/Faker/Provider/kk_KZ/CompanyTest.php
vendored
Normal file
31
vendor/fzaninotto/faker/test/Faker/Provider/kk_KZ/CompanyTest.php
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
namespace Faker\Test\Provider\kk_KZ;
|
||||
|
||||
use Faker\Generator;
|
||||
use Faker\Provider\kk_KZ\Company;
|
||||
|
||||
class CompanyTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
$this->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
|
||||
);
|
||||
}
|
||||
}
|
||||
29
vendor/fzaninotto/faker/test/Faker/Provider/kk_KZ/PersonTest.php
vendored
Normal file
29
vendor/fzaninotto/faker/test/Faker/Provider/kk_KZ/PersonTest.php
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
namespace Faker\Test\Provider\kk_KZ;
|
||||
|
||||
use Faker\Generator;
|
||||
use Faker\Provider\DateTime;
|
||||
use Faker\Provider\kk_KZ\Person;
|
||||
|
||||
class PersonTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
$this->faker = new Generator();
|
||||
|
||||
$this->faker->addProvider(new Person($this->faker));
|
||||
}
|
||||
|
||||
public function testIndividualIdentificationNumberIsValid()
|
||||
{
|
||||
$birthDate = DateTime::dateTimeBetween('-30 years', '-10 years');
|
||||
$individualIdentificationNumber = $this->faker->individualIdentificationNumber($birthDate);
|
||||
$controlDigit = Person::checkSum($individualIdentificationNumber);
|
||||
|
||||
$this->assertTrue($controlDigit === (int)substr($individualIdentificationNumber, 11, 1));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user