Skip to content

Commit

Permalink
Tests du service STATS
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgu74 committed Sep 21, 2013
1 parent e16b852 commit c443abe
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions tests/Payutc/Service/StatsRodbTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ public function testGetNbSell()
$this->loginCas($cookie, $r, 'mguffroy@POSS3', 'POSS3');
$this->loginApp($cookie, $r, 'app_stats');
$r = httpSend('STATS', 'getNbSell', $cookie, array(
'obj_id' => '3',
'obj_id' => '4',
'fun_id' => '1'
));
$this->assertEquals(200, $r->code);
print_r($r->body);
$this->assertEquals(8, $r->body);
}


Expand All @@ -49,27 +49,14 @@ public function testGetRank()
'semestre' => 'P13'
));
$this->assertEquals(200, $r->code);
print_r($r->body);
$this->assertEquals(array(array(
'totalPrice' => 630,
'nbBuy' => 9,
'usr_firstname' => 'Matthieu',
'usr_lastname' => 'Guffroy',
'usr_nickname' => 'mguffroy'
)), $r->body);
}

/**
* @requires PHP 5.4
*/
public function testGetRankErrorOnSemester()
{
$cookie = '';
$r = null;
$this->loginCas($cookie, $r, 'mguffroy@POSS3', 'POSS3');
$this->loginApp($cookie, $r, 'app_stats');
$r = httpSend('STATS', 'getRank', $cookie, array(
'fun_id' => '1',
'semester' => 'Automne 2013'
));
//$this->assertEquals(200, $r->code);
print($r->code);
}



}

Expand Down

0 comments on commit c443abe

Please sign in to comment.