public function testDelete()
 {
     foreach ($this->roleBook->get() as $role) {
         $this->roleBook->delete($role);
     }
     $this->assertEquals(0, count($this->roleBook->get()));
 }
 /**
  * Sets up the fixture, for example, open a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->connection = Connection::get();
     $this->userBook = new UserBook($this->connection);
     $this->providerInfoBook = new ProviderInfoBook($this->connection);
     $this->roleBook = new RoleBook($this->connection);
     foreach ($this->providerInfoBook->get() as $providerInfo) {
         $this->providerInfoBook->delete($providerInfo);
     }
     foreach ($this->roleBook->get() as $role) {
         $this->roleBook->delete($role);
     }
     for ($k = 0; $k < 10; $k++) {
         $user = new User();
         $user->setEnabled(RandomBook::getRandomBoolean())->setEnabledDate(RandomBook::getRandomDate())->setAccessFailedCount(rand(1, 5))->setEmail(RandomBook::getRandomEmail())->setPassword(RandomBook::getRandomString())->setPhoneNumber(RandomBook::getRandomPhoneNumber())->setTwoFactorEnabled(RandomBook::getRandomBoolean())->setUserName(RandomBook::getRandomString());
         $this->userList[] = $user;
     }
 }