示例#1
0
 /**
  * Testing the loadByAttribute method.
  *
  * @since 1.0
  * @dataProvider getActiveRecordProviders
  */
 public function testLoadByAttribute($provider)
 {
     $config = ConfigProvider::getInstance();
     $config->set('db.provider.name', $provider);
     $this->person->save();
     $this->person->loadByAttribute('displayName', 'unitTestUser');
     $this->assertEquals('*****@*****.**', $this->person->get('email'), 'Testing the loadByAttribute method');
     $this->person->loadByAttribute('email', '*****@*****.**');
     $this->assertEquals('unitTestUser', $this->person->getDisplayname()->getValue(), 'Testing the loadByAttribute method');
 }