public function testGetsGroupAdmins() { $userId = 1232; $repo = new UserRepository(); $command = new GetAllGroupAdminsCommand($userId); $userRows = array($this->GetUserRow(1, 'admin', 'guy', 'email'), $this->GetUserRow(), $this->GetUserRow()); $this->db->SetRows($userRows); $admins = $repo->GetGroupAdmins($userId); $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); }