Skip to content

Commit

Permalink
CC-32771 Added helper method to assert error message in BAPI response…
Browse files Browse the repository at this point in the history
…s. (#10846)

CC-32771 BAPI: picking-list endpoint
  • Loading branch information
AsonUnique authored Mar 5, 2024
1 parent 329c379 commit 0a3578c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,21 @@ public function seeJsonApiResponseErrorsHaveDetail(string $detail, string $index
], sprintf('$.errors[%s]', $index));
}

/**
* @part json
*
* @param string $message
* @param string $index
*
* @return void
*/
public function seeJsonApiResponseErrorsHaveMessage(string $message, string $index = '*'): void
{
$this->getJsonPathModule()->seeResponseJsonPathContains([
'message' => $message,
], sprintf('$.errors[%s]', $index));
}

/**
* @part json
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@
use Codeception\Codecept;
use Codeception\Suite;
use ReflectionClass;
use Spryker\Zed\Kernel\Persistence\EntityManager\InstancePoolingTrait;

class FixturesRunner extends Codecept
{
use InstancePoolingTrait;

/**
* @inheritDoc
*/
public function runSuite(array $settings, string $suite, ?string $test = null): void
{
$this->disableInstancePooling();

$settings['shard'] = $this->options['shard'];
$suiteManager = new FixturesSuiteManager($this->dispatcher, $suite, $settings, $this->options);
$suiteManager->initialize();
Expand Down

0 comments on commit 0a3578c

Please sign in to comment.