Refactor && Typo && Use plain objects as function parameters instead of ids

This commit is contained in:
Nicolas Le Goff
2014-02-06 12:42:47 +01:00
parent c98fe4c23d
commit 2ec4ffdbcc
39 changed files with 909 additions and 692 deletions

View File

@@ -366,20 +366,18 @@ class UsersTest extends \PhraseanetAuthenticatedWebTestCase
self::$DI['app']['manipulator.user']->delete($user);
}
public function testRenderDemands()
public function testRenderRegistrations()
{
self::$DI['client']->request('GET', '/admin/users/demands/');
self::$DI['client']->request('GET', '/admin/users/registrations/');
$this->assertTrue(self::$DI['client']->getResponse()->isOk());
}
public function testPostDemands()
public function testPostRegistrations()
{
$id = self::$DI['user_alt1']->getId();
$baseId = self::$DI['collection']->get_base_id();
$param = sprintf('%s_%s', $id, $baseId);
$appbox = self::$DI['app']['phraseanet.appbox'];
$stmt = $this->getMock('PDOStatement');
$stmt->expects($this->any())
@@ -408,7 +406,7 @@ class UsersTest extends \PhraseanetAuthenticatedWebTestCase
$this->mockNotificationDeliverer('Alchemy\Phrasea\Notification\Mail\MailSuccessEmailUpdate');
self::$DI['client']->request('POST', '/admin/users/demands/', [
self::$DI['client']->request('POST', '/admin/users/registrations/', [
'template' => [],
'accept' => [$param],
'accept_hd' => [$param],