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 70be9b1

Browse filesBrowse files
committed
fix tests
1 parent dfa5e5d commit 70be9b1
Copy full SHA for 70be9b1

File tree

1 file changed

+1
-4
lines changed
Filter options

1 file changed

+1
-4
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
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -665,13 +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())
671+
$validator->expects($this->never())
673672
->method('validate')
674-
->with($payload)
675673
->willReturn(new ConstraintViolationList([new ConstraintViolation('Test', null, [], '', null, '')]));
676674

677675
$resolver = new RequestPayloadValueResolver($serializer, $validator);
@@ -693,7 +691,6 @@ public function testRequestPayloadValidationErrorCustomStatusCode()
693691
$this->assertSame(400, $e->getStatusCode());
694692
$this->assertInstanceOf(ValidationFailedException::class, $validationFailedException);
695693
$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());
697694
}
698695
}
699696
}

0 commit comments

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