Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bb836c4

Browse filesBrowse files
committed
minor #53135 fix tests (xabbuh)
This PR was merged into the 6.4 branch. Discussion ---------- fix tests | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- 12f8ab4 fix tests
2 parents dfa5e5d + 12f8ab4 commit bb836c4
Copy full SHA for bb836c4

File tree

1 file changed

+2
-6
lines changed
Filter options

1 file changed

+2
-6
lines changed

‎src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/RequestPayloadValueResolverTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/RequestPayloadValueResolverTest.php
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -665,14 +665,11 @@ public function testQueryValidationErrorCustomStatusCode()
665665
public function testRequestPayloadValidationErrorCustomStatusCode()
666666
{
667667
$content = '{"price": 50, "title": ["not a string"]}';
668-
$payload = new RequestPayload(50);
669668
$serializer = new Serializer([new ObjectNormalizer()], ['json' => new JsonEncoder()]);
670669

671670
$validator = $this->createMock(ValidatorInterface::class);
672-
$validator->expects($this->once())
673-
->method('validate')
674-
->with($payload)
675-
->willReturn(new ConstraintViolationList([new ConstraintViolation('Test', null, [], '', null, '')]));
671+
$validator->expects($this->never())
672+
->method('validate');
676673

677674
$resolver = new RequestPayloadValueResolver($serializer, $validator);
678675

@@ -693,7 +690,6 @@ public function testRequestPayloadValidationErrorCustomStatusCode()
693690
$this->assertSame(400, $e->getStatusCode());
694691
$this->assertInstanceOf(ValidationFailedException::class, $validationFailedException);
695692
$this->assertSame(sprintf('This value should be of type %s.', class_exists(InvalidTypeException::class) ? 'string' : 'unknown'), $validationFailedException->getViolations()[0]->getMessage());
696-
$this->assertSame('Test', $validationFailedException->getViolations()[1]->getMessage());
697693
}
698694
}
699695
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.