Skip to content

Commit

Permalink
fix test : missing crsf token
Browse files Browse the repository at this point in the history
  • Loading branch information
jygaulier committed Nov 14, 2023
2 parents 7f46a12 + b51e73d commit 74ad2c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/Alchemy/Tests/Phrasea/Controller/Prod/LazaretTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,16 @@ public function testAddElementWithCopyMeta()
$em->expects($this->once())
->method('flush');

$randomValue = $this->setSessionFormToken('prodLazaret');

self::$DI['app']['orm.em'] = $em;
self::$DI['client']->request('POST', '/prod/lazaret/' . $id . '/force-add/', [
'copy_meta' => 1,
'record_id' => self::$DI['record_1']->get_record_id(),
'bas_id' => $lazaretFile->getBaseId(),
'keep_attributes' => 1,
'attributes' => [1, 2, 3, 4] //Check only the four first attributes
'attributes' => [1, 2, 3, 4], //Check only the four first attributes
'prodLazaret_token' => $randomValue
]);

$response = self::$DI['client']->getResponse();
Expand Down

0 comments on commit 74ad2c2

Please sign in to comment.