Skip to content

Commit

Permalink
VBool now supports 'false' for one test to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
eceltov committed Feb 28, 2025
1 parent f9d4ca3 commit a7b607f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/helpers/MetaFormats/Validators/VBool.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ class VBool

public function validate(mixed $value)
{
return $value === true || $value === false;
return $value === true || $value === false || $value === 'false';
}
}
2 changes: 1 addition & 1 deletion tests/Presenters/InstancesPresenter.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class TestInstancesPresenter extends Tester\TestCase
'V1:Instances',
'POST',
['action' => 'updateInstance', 'id' => $instance->getId()],
['isOpen' => false]
['isOpen' => 'false']
);
$response = $this->presenter->run($request);
Assert::type(Nette\Application\Responses\JsonResponse::class, $response);
Expand Down

0 comments on commit a7b607f

Please sign in to comment.