Пример #1
0
 /**
  * test auth register user
  * @author Gabriel Giannattasio
  * @test
  * @dataProvider providerValidUsers
  * @depends test_if_auth_exists
  */
 public function test_auth_register_valid_users($fields)
 {
     UserTests::useTestDB();
     $status = TRUE;
     try {
         Auth::instance()->register($fields);
     } catch (Exception $e) {
         $status = FALSE;
     }
     $this->assertTrue($status, 'Must be a valid user.');
 }
Пример #2
0
 /**
  * @covers CouchDB::__construct
  */
 protected function setUp()
 {
     $options = array('authorization' => 'basic', 'username' => 'admin', 'password' => 'admin');
     $this->couchdb = new CouchDB($options);
     $this->couchdbLogin = new CouchDB();
     if (UserTests::$startAclCount === null) {
         $acl = $this->couchdb->acl();
         if ($acl->error) {
             UserTests::$startAclCount = 0;
             UserTests::$resetAcl = true;
         } else {
             UserTests::$startAclCount = count($acl->result['rules']);
         }
     }
 }