public function setUp()
 {
     parent::setUp();
     for ($i = 0; $i < TestData::RANDOM_TESTS_NUMBER; $i++) {
         //register random users for sample contest
         $user = TestData::genUserDescription(sizeof($this->userDataColumns));
         $this->apiRegisterUser(array('user' => $user));
         unset($user->userID);
         $this->users[] = $user;
     }
     $getUsersReq = $this->apiGetUsers();
     $this->curUsers = array_slice($getUsersReq, 2);
     //removing contest admin and first participant
 }
 public function setUp()
 {
     parent::setUp();
     for ($i = 0; $i < TestData::RANDOM_TESTS_NUMBER; $i++) {
         $req = TestData::fillRequest('AdjustPluginRequest', array('sessionID' => $this->sessionID, 'side' => 'Client', 'description' => TestData::genUnicodeStr(42), 'pluginAlias' => TestData::genFileName(12), 'pluginData' => TestData::genUnicodeStr(42)));
         $this->clientPluginAliases[] = $req->pluginAlias;
         $this->clientPluginDescriptions[] = $req->description;
         $this->clientPluginData[] = $req->pluginData;
         $this->assertEquals(new AcceptedResponse(), RequestSender::send($req));
         $req = TestData::fillRequest('AdjustPluginRequest', array('sessionID' => $this->sessionID, 'side' => 'Server', 'description' => TestData::genUnicodeStr(42), 'pluginAlias' => TestData::genFileName(12), 'pluginData' => TestData::genUnicodeStr(42)));
         $this->serverPluginAliases[] = $req->pluginAlias;
         $this->serverPluginDescriptions[] = $req->description;
         $this->serverPluginData[] = $req->pluginData;
         $this->assertEquals(new AcceptedResponse(), RequestSender::send($req));
     }
 }
Beispiel #3
0
 public function setUp()
 {
     parent::setUp();
     //creating another sample contest with registration type = 'Self'
     $req = new CreateContestRequest();
     $req->sessionID = $this->connect->sessionID;
     $cd = new ContestDescription();
     $cd->registrationType = 'Self';
     //TODO: big refactor
     $req->contest = $cd;
     $this->contestID2 = RequestSender::send($req)->createdContestID;
 }
 public function setUp()
 {
     parent::setUp();
 }