This commit is contained in:
xdrm-brackets 2017-05-12 23:57:45 +02:00
parent 3c5dccaea4
commit fe6386d6fb
1 changed files with 27 additions and 1 deletions

View File

@ -76,11 +76,37 @@
/*
* @depends testCreateCorrect
*/
public function testCreateAlready(){
public function testCreateAlreadyCode(){
/* (1) Création requête */
$req = new Request('userDefault/create', [
'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',
'firstname' => 'a bcdef123456',
'lastname' => 'ab cdef123456',