sendPOST() public method

Sends a POST request to given uri. Parameters and files (as array of filenames) can be provided.
See also: Codeception\Module\REST::sendPOST()
public sendPOST ( $url, array | JsonSerializable $params = null, array $files = null )
$url
$params array | JsonSerializable
$files array
Ejemplo n.º 1
0
 /**
  * Test for requirement 70 of docent
  */
 public function gemiddeldeOverzichtGenereren(\WebGuy $I)
 {
     $I->wantTo('Gemiddelde overzicht genereren');
     $I->amOnPage('/login');
     $I->see('Uren');
     $I->fillField('Username', 'docent');
     $I->fillField('Password', 'docent');
     $I->click('Login');
     $I->amOnPage('/docent/2');
     $I->see('Docent Page');
     $I->sendPOST('/docent/2/overzicht', array('week' => '51-2013'));
     $I->see('student');
     $I->see('1:07');
 }
Ejemplo n.º 2
0
 /**
  * Test for requirement 30 of student TODO
  * @param  WebGuy $I [description]
  * @return [type]    [description]
  */
 public function gemiddeldeOverzichtAfdrukken(\WebGuy $I)
 {
     $I->amOnPage('/login');
     $I->see('Uren');
     $I->fillField('Username', 'student');
     $I->fillField('Password', 'student');
     $I->click('Login');
     $I->amOnPage('/student/1');
     $I->see('Student Page');
     $I->click('Overzicht');
     // POST not working, if I can't get this to work then this test will always fails
     $I->sendPOST('/student/1/overzicht', array('week' => '51-2013'));
     $I->see('Cursus');
     $I->see('Uren voor week 51');
 }