Ejemplo n.º 1
0
 public function testGetsApplicationAdmins()
 {
     $repo = new UserRepository();
     $command = new GetAllApplicationAdminsCommand();
     $userRows = array($this->GetUserRow(1, 'admin', 'guy', 'email'), $this->GetUserRow(), $this->GetUserRow());
     $this->db->SetRows($userRows);
     $admins = $repo->GetApplicationAdmins();
     $admin = $admins[0];
     $this->assertEquals(3, count($admins));
     $this->assertEquals(1, $admin->Id());
     $this->assertEquals('admin', $admin->FirstName());
     $this->assertEquals('guy', $admin->LastName());
     $this->assertEquals($command, $this->db->_LastCommand);
 }