예제 #1
0
 public function testCreateAndIterateLazyModels()
 {
     $users = new RedBeanModels('User');
     $this->assertEquals(count($this->usernames), $users->count());
     foreach ($users as $user) {
         $this->assertTrue(in_array($user->username, $this->usernames));
         $this->assertEquals($user->username, $user->firstName);
         $this->assertEquals($user->username, $user->lastName);
     }
 }
 /**
  * Returns true if any of the models have been added to or removed
  * from the collection or of any models in the collection have been
  * modified.
  */
 public function isModified()
 {
     return $this->modified || parent::isModified();
 }