public function testFakeName()
 {
     $name = fake_name();
     $this->assertTrue($name != null);
     $this->assertTrue($name->simple_name != null);
     $this->assertTrue($name->first_name != null);
     $this->assertTrue($name->last_name != null);
 }
Пример #2
0
 public function registerUser()
 {
     $post = array('email_address' => fake_email(), 'password' => $this->the_user_password, 'username' => 'andy', 'name' => fake_name()->simple_name, 'mobile' => 13260795910, 'sex' => 0, 'contact_name' => 'pinet', 'contact_country' => 'china', 'contact_province' => 'jiasu', 'contact_city' => 'suzhou', 'contact_street' => 'xinghu', 'contact_postalcode' => 203902, 'contact_profile' => '', 'group_id' => 2, 'user_type' => '0');
     $this->the_user = $this->CI->user_model->register($post);
     $this->the_user = $this->CI->user_model->load($this->the_user);
 }
Пример #3
0
function fake_user($id = 1000, $name = null)
{
    if ($name == null) {
        $fakename = fake_name();
    } else {
        $fakename = fake_name($name);
    }
    return (object) array('id' => $id, 'email_address' => fake_email($fakename), 'username' => $fakename->simple_name, 'password' => md5('password'));
}