minmod
This commit is contained in:
parent
3c5dccaea4
commit
fe6386d6fb
|
@ -76,11 +76,37 @@
|
||||||
/*
|
/*
|
||||||
* @depends testCreateCorrect
|
* @depends testCreateCorrect
|
||||||
*/
|
*/
|
||||||
public function testCreateAlready(){
|
public function testCreateAlreadyCode(){
|
||||||
|
|
||||||
/* (1) Création requête */
|
/* (1) Création requête */
|
||||||
$req = new Request('userDefault/create', [
|
$req = new Request('userDefault/create', [
|
||||||
'code' => '12-AB-CD-EF',
|
'code' => '12-AB-CD-EF',
|
||||||
|
'username' => 'xxx',
|
||||||
|
'firstname' => 'a bcdef123456',
|
||||||
|
'lastname' => 'ab cdef123456',
|
||||||
|
'mail' => 'ab@cd.ef'
|
||||||
|
]);
|
||||||
|
|
||||||
|
/* (2) Gestion erreur */
|
||||||
|
$this->assertEquals($req->error->get(), Err::Success);
|
||||||
|
|
||||||
|
/* (3) Gestion erreur */
|
||||||
|
$res = $req->dispatch();
|
||||||
|
|
||||||
|
/* (4) Gestion erreur */
|
||||||
|
$this->assertEquals($res->error->get(), Err::AlreadyExists);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @depends testCreateCorrect
|
||||||
|
*/
|
||||||
|
public function testCreateAlreadyUsername(){
|
||||||
|
|
||||||
|
/* (1) Création requête */
|
||||||
|
$req = new Request('userDefault/create', [
|
||||||
|
'code' => '01-10-01-10',
|
||||||
'username' => 'abcdef123456',
|
'username' => 'abcdef123456',
|
||||||
'firstname' => 'a bcdef123456',
|
'firstname' => 'a bcdef123456',
|
||||||
'lastname' => 'ab cdef123456',
|
'lastname' => 'ab cdef123456',
|
||||||
|
|
Loading…
Reference in New Issue