Skip to content

Commit

Permalink
Merge pull request #60 from OpenClassrooms/handle-20x-statuses-exampl…
Browse files Browse the repository at this point in the history
…es-prep
  • Loading branch information
sidux authored Mar 27, 2024
2 parents 610d5aa + 3c8dde7 commit 1831d5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Preparator/ExamplesPreparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private function handleExtension(Operations $operations): Operations
private function prepareTestCases(Operation $operation): iterable
{
$examples = $operation->getExamples();
if ($this->config->autoCreateWhenMissing && $examples->count() > 0) {
if ($this->config->autoCreateWhenMissing && $examples->count() === 0) {
$examples = new OperationExamples([
$operation->getRandomExample(),
]);
Expand Down

0 comments on commit 1831d5f

Please sign in to comment.