diff --git a/tests/classes/record/adapterTest.php b/tests/classes/record/adapterTest.php index 07ec468e4c..487f176310 100644 --- a/tests/classes/record/adapterTest.php +++ b/tests/classes/record/adapterTest.php @@ -76,6 +76,9 @@ public function testSetExport() $app['phraseanet.user-query']->expects($this->any())->method('who_have_right')->will($this->returnSelf()); $app['phraseanet.user-query']->expects($this->any())->method('execute')->will($this->returnSelf()); + $randomValue = bin2hex(random_bytes(35)); + $app['session']->set('prodExportOrder_token', $randomValue); + $app['notification.deliverer'] = $this->getMockBuilder('Alchemy\Phrasea\Notification\Deliverer') ->disableOriginalConstructor() ->getMock(); @@ -87,7 +90,8 @@ public function testSetExport() $this->getClient()->request( 'POST', $app['url_generator']->generate('prod_order_new'), [ 'lst' => $this->getRecord1()->getId(), - 'deadline' => '+10 minutes' + 'deadline' => '+10 minutes', + 'prodExportOrder_token' => $randomValue ]); $this->assertTrue($triggered);