Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Commit

Permalink
fixed CS
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jul 3, 2019
1 parent bd2cf70 commit 2d80083
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 70 deletions.
2 changes: 1 addition & 1 deletion Tests/EventListener/IsGrantedListenerTest.php
Expand Up @@ -88,7 +88,7 @@ public function testIsGrantedSubjectFromArgumentsWithArray()
'arg1Name' => 'arg1Value',
'arg2Name' => 'arg2Value',
])
->will($this->returnValue(true));
->willReturn(true);

// create metadata for 2 named args for the controller
$listener = new IsGrantedListener($this->createArgumentNameConverter(['arg1Name' => 'arg1Value', 'arg2Name' => 'arg2Value']), $authChecker);
Expand Down
2 changes: 1 addition & 1 deletion Tests/Request/ArgumentNameConverterTest.php
Expand Up @@ -29,7 +29,7 @@ public function testGetControllerArguments(array $resolvedArguments, array $argu
$metadataFactory = $this->getMockBuilder(ArgumentMetadataFactoryInterface::class)->getMock();
$metadataFactory->expects($this->any())
->method('createArgumentMetadata')
->will($this->returnValue($argumentMetadatas));
->willReturn($argumentMetadatas);

$request = new Request();
$request->attributes->add($requestAttributes);
Expand Down
10 changes: 5 additions & 5 deletions Tests/Request/ParamConverter/DateTimeParamConverterTest.php
Expand Up @@ -69,7 +69,7 @@ public function testApplyWithFormatInvalidDate404Exception()
{
$request = new Request([], [], ['start' => '2012-07-21']);
$config = $this->createConfiguration('DateTime', 'start');
$config->expects($this->any())->method('getOptions')->will($this->returnValue(['format' => 'd.m.Y']));
$config->expects($this->any())->method('getOptions')->willReturn(['format' => 'd.m.Y']);

$this->converter->apply($request, $config);
}
Expand All @@ -82,7 +82,7 @@ public function testApplyWithYmdFormatInvalidDate404Exception()
{
$request = new Request([], [], ['start' => '2012-21-07']);
$config = $this->createConfiguration('DateTime', 'start');
$config->expects($this->any())->method('getOptions')->will($this->returnValue(['format' => 'Y-m-d']));
$config->expects($this->any())->method('getOptions')->willReturn(['format' => 'Y-m-d']);

$this->converter->apply($request, $config);
}
Expand All @@ -93,7 +93,7 @@ public function testApplyOptionalWithEmptyAttribute()
$config = $this->createConfiguration('DateTime', 'start');
$config->expects($this->once())
->method('isOptional')
->will($this->returnValue(true));
->willReturn(true);

$this->assertTrue($this->converter->apply($request, $config));
$this->assertNull($request->attributes->get('start'));
Expand Down Expand Up @@ -135,12 +135,12 @@ public function createConfiguration($class = null, $name = null)
if (null !== $name) {
$config->expects($this->any())
->method('getName')
->will($this->returnValue($name));
->willReturn($name);
}
if (null !== $class) {
$config->expects($this->any())
->method('getClass')
->will($this->returnValue($class));
->willReturn($class);
}

return $config;
Expand Down

0 comments on commit 2d80083

Please sign in to comment.