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