This commit is contained in:
xdrm-brackets 2017-05-12 23:57:45 +02:00
parent 8aafcbfdcf
commit 8095264a09
2 changed files with 36 additions and 10 deletions

View File

@ -43,13 +43,13 @@
<tr> <tr>
<td class="danger">Total</td> <td class="danger">Total</td>
<td class="danger big"> <div class="progress"> <td class="danger big"> <div class="progress">
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="23.47" aria-valuemin="0" aria-valuemax="100" style="width: 23.47%"> <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="23.50" aria-valuemin="0" aria-valuemax="100" style="width: 23.50%">
<span class="sr-only">23.47% covered (danger)</span> <span class="sr-only">23.50% covered (danger)</span>
</div> </div>
</div> </div>
</td> </td>
<td class="danger small"><div align="right">23.47%</div></td> <td class="danger small"><div align="right">23.50%</div></td>
<td class="danger small"><div align="right">667&nbsp;/&nbsp;2842</div></td> <td class="danger small"><div align="right">668&nbsp;/&nbsp;2842</div></td>
<td class="danger big"> <div class="progress"> <td class="danger big"> <div class="progress">
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="10.14" aria-valuemin="0" aria-valuemax="100" style="width: 10.14%"> <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="10.14" aria-valuemin="0" aria-valuemax="100" style="width: 10.14%">
<span class="sr-only">10.14% covered (danger)</span> <span class="sr-only">10.14% covered (danger)</span>
@ -71,13 +71,13 @@
<tr> <tr>
<td class="danger"><span class="glyphicon glyphicon-folder-open"></span> <a href="api/index.html">api</a></td> <td class="danger"><span class="glyphicon glyphicon-folder-open"></span> <a href="api/index.html">api</a></td>
<td class="danger big"> <div class="progress"> <td class="danger big"> <div class="progress">
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="17.55" aria-valuemin="0" aria-valuemax="100" style="width: 17.55%"> <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="17.65" aria-valuemin="0" aria-valuemax="100" style="width: 17.65%">
<span class="sr-only">17.55% covered (danger)</span> <span class="sr-only">17.65% covered (danger)</span>
</div> </div>
</div> </div>
</td> </td>
<td class="danger small"><div align="right">17.55%</div></td> <td class="danger small"><div align="right">17.65%</div></td>
<td class="danger small"><div align="right">179&nbsp;/&nbsp;1020</div></td> <td class="danger small"><div align="right">180&nbsp;/&nbsp;1020</div></td>
<td class="danger big"> <div class="progress"> <td class="danger big"> <div class="progress">
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="5.56" aria-valuemin="0" aria-valuemax="100" style="width: 5.56%"> <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="5.56" aria-valuemin="0" aria-valuemax="100" style="width: 5.56%">
<span class="sr-only">5.56% covered (danger)</span> <span class="sr-only">5.56% covered (danger)</span>
@ -276,7 +276,7 @@
<span class="success"><strong>High</strong>: 90% to 100%</span> <span class="success"><strong>High</strong>: 90% to 100%</span>
</p> </p>
<p> <p>
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 5.2.1</a> using <a href="https://secure.php.net/" target="_top">PHP 7.0.15-0ubuntu0.16.04.4</a> with <a href="https://xdebug.org/">Xdebug 2.4.0</a> and <a href="https://phpunit.de/">PHPUnit 6.1.3</a> at Fri May 12 21:51:59 UTC 2017.</small> <small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 5.2.1</a> using <a href="https://secure.php.net/" target="_top">PHP 7.0.15-0ubuntu0.16.04.4</a> with <a href="https://xdebug.org/">Xdebug 2.4.0</a> and <a href="https://phpunit.de/">PHPUnit 6.1.3</a> at Fri May 12 21:54:47 UTC 2017.</small>
</p> </p>
</footer> </footer>
</div> </div>

View File

@ -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',