mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
fix some tests
This commit is contained in:
@@ -564,6 +564,8 @@ return call_user_func(
|
||||
|
||||
$app->error(function($e) use($app)
|
||||
{
|
||||
|
||||
var_dump($e->getMessage());
|
||||
/* @var $twig \Twig_Environment */
|
||||
$twig = $app['Core']->getTwig();
|
||||
$registry = \registry::get_instance();
|
||||
|
@@ -307,8 +307,12 @@ class ApplicationLightboxTest extends PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
$basket = $this->insertOneBasket();
|
||||
|
||||
$crawler = $this->client->request('POST', '/ajax/SET_RELEASE/' . $basket->getId() . '/');
|
||||
$this->assertEquals(400, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
$this->assertEquals('application/json', $this->client->getResponse()->headers->get('Content-type'));
|
||||
$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() . '/');
|
||||
|
@@ -505,16 +505,18 @@ class ControllerBasketTest extends PhraseanetWebTestCaseAuthenticatedAbstract
|
||||
|
||||
$route = sprintf('/baskets/%s/stealElements/', $Basket_2->getId());
|
||||
|
||||
$crawler = $this->client->request(
|
||||
$this->client->request(
|
||||
'POST', $route, array(
|
||||
'elements' => array($BasketElement->getId(), 'ufdsd')
|
||||
), array()
|
||||
), array(), array(
|
||||
"HTTP_ACCEPT" => "application/json"
|
||||
)
|
||||
);
|
||||
|
||||
$response = $this->client->getResponse();
|
||||
|
||||
|
||||
$this->assertEquals(302, $response->getStatusCode());
|
||||
$this->assertEquals(200, $response->getStatusCode());
|
||||
|
||||
$em = self::$core->getEntityManager();
|
||||
/* @var $em \Doctrine\ORM\EntityManager */
|
||||
|
Reference in New Issue
Block a user