mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 22:43:19 +00:00
Coding standards
This commit is contained in:
@@ -401,7 +401,7 @@ class ApiYamlApplication extends PhraseanetWebTestCaseAbstract
|
||||
$this->evaluateBadRequestRoute($route, array('GET'));
|
||||
$this->evaluateMethodNotAllowedRoute($route, array('POST', 'PUT', 'DELETE'));
|
||||
}
|
||||
|
||||
|
||||
public function testRecordsMetadatasRoute()
|
||||
{
|
||||
foreach (static::$databoxe_ids as $databox_id)
|
||||
@@ -1243,7 +1243,7 @@ class ApiYamlApplication extends PhraseanetWebTestCaseAbstract
|
||||
$this->assertTrue(is_string($meta["value"]));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function evaluateRecordsMetadataResponse($content)
|
||||
{
|
||||
$this->assertArrayHasKey("metadatas", $content["response"]);
|
||||
|
@@ -312,7 +312,7 @@ class ApplicationLightboxTest extends PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
$datas = json_decode($this->client->getResponse()->getContent());
|
||||
$this->assertTrue(is_object($datas), 'asserting good json datas');
|
||||
$this->assertTrue($datas->error);
|
||||
|
||||
|
||||
$validationBasket = $this->insertOneValidationBasket();
|
||||
|
||||
$crawler = $this->client->request('POST', '/ajax/SET_RELEASE/' . $validationBasket->getId() . '/');
|
||||
|
@@ -461,45 +461,45 @@ class ControllerBasketTest extends PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
$this->assertEquals(2, $basket->getElements()->count());
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function testAddElementToValidationPost()
|
||||
{
|
||||
|
||||
|
||||
$em = self::$core->getEntityManager();
|
||||
|
||||
|
||||
$datas = $em->getRepository('Entities\ValidationData')->findAll();
|
||||
$countDatas = count($datas);
|
||||
|
||||
|
||||
$validationSession = new \Entities\ValidationSession();
|
||||
|
||||
|
||||
$validationSession->setDescription('Une description au hasard');
|
||||
$validationSession->setName('Un nom de validation');
|
||||
$expires = new \DateTime();
|
||||
$expires->modify('+1 week');
|
||||
$validationSession->setExpires($expires);
|
||||
$validationSession->setInitiator(self::$user);
|
||||
|
||||
|
||||
$basket = new \Entities\Basket();
|
||||
$basket->setName('test');
|
||||
$basket->setDescription('description');
|
||||
$basket->setOwner(self::$user);
|
||||
$basket->setValidation($validationSession);
|
||||
$validationSession->setBasket($basket);
|
||||
|
||||
|
||||
|
||||
|
||||
$validationParticipant = new \Entities\ValidationParticipant();
|
||||
$validationParticipant->setSession($validationSession);
|
||||
$validationParticipant->setUser(self::$user_alt1);
|
||||
$validationSession->addValidationParticipant($validationParticipant);
|
||||
|
||||
|
||||
$em->persist($validationParticipant);
|
||||
$em->persist($basket);
|
||||
$em->persist($validationSession);
|
||||
|
||||
|
||||
$em->flush();
|
||||
|
||||
|
||||
$route = sprintf('/baskets/%s/addElements/', $basket->getId());
|
||||
|
||||
|
||||
$records = array(
|
||||
self::$record_1->get_serialize_key(),
|
||||
self::$record_2->get_serialize_key(),
|
||||
@@ -522,13 +522,13 @@ class ControllerBasketTest extends PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
$basket = $em->getRepository('Entities\Basket')->find($basket->getId());
|
||||
|
||||
$this->assertEquals(2, $basket->getElements()->count());
|
||||
|
||||
|
||||
$datas = $em->getRepository('Entities\ValidationData')->findAll();
|
||||
|
||||
|
||||
$this->assertTrue($countDatas < count($datas), 'assert that '.count($datas).' > '.$countDatas );
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function testAddElementPostJSON()
|
||||
{
|
||||
$basket = $this->insertOneBasket();
|
||||
|
@@ -271,7 +271,7 @@ class BridgeApplication extends PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
try
|
||||
@@ -281,7 +281,7 @@ class BridgeApplication extends PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user