Beispiel #1
0
 public function testGriOrg()
 {
     $faker = Faker\Factory::create('ru_RU');
     $company = $faker->company;
     $admin = new Admin(['nic_hdl' => Helper::hdl(time(), true), 'type' => Admin::TYPE_ORG, 'orgname_ru' => $company, 'orgname_en' => Helper::translit($company), 'inn' => $faker->numerify('##########'), 'kpp' => $faker->numerify('#########'), 'ogrn' => $faker->numerify('#############'), 'legal_addr' => $faker->address, 'postal_addr' => $faker->address, 'phone' => $faker->numerify('+7 9## #######'), 'fax' => $faker->numerify('+7 8### ######'), 'e_mail' => $faker->email, 'director_name' => $faker->name, 'bank' => $faker->bank(), 'ras_schet' => $faker->numerify('####################'), 'kor_schet' => $faker->numerify('####################'), 'bik' => $faker->numerify('########')]);
     $this->assertTrue($admin->add());
     $admin->phone = $faker->numerify('+7 9## #######');
     $this->assertTrue($admin->update());
     $this->assertTrue(Admin::find()->where(['nic_hdl' => $admin->nic_hdl])->one()->phone == $admin->phone);
 }
Beispiel #2
0
 public function __construct($config = [])
 {
     Helper::configure($this, $config);
 }