Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
aynsix committed Sep 6, 2023
1 parent 9dc7f4f commit caea93a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/classes/record/adapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down

0 comments on commit caea93a

Please sign in to comment.