8000 [DoctrineBridge] Improve EntityValueResolverTest a bit · symfony/symfony@b638280 · GitHub
[go: up one dir, main page]

Skip to content

Commit b638280

Browse files
[DoctrineBridge] Improve EntityValueResolverTest a bit
1 parent d01ce28 commit b638280

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function testSupportWithoutManager()
138138
$this->assertFalse($converter->supports($request, $argument));
139139
}
140140

141-
public function testApplyWithNoIdAndData()
141+
public function testResolveWithNoIdAndData()
142142
{
143143
$registry = $this->getMockBuilder(ManagerRegistry::class)->getMock();
144144
$registry->expects($this->once())
@@ -155,7 +155,7 @@ public function testApplyWithNoIdAndData()
155155
$converter->resolve($request, $argument);
156156
}
157157

158-
public function testApplyWithNoIdAndDataOptional()
158+
public function testResolveWithNoIdAndDataOptional()
159159
{
160160
$registry = $this->getMockBuilder(ManagerRegistry::class)->getMock();
161161
$registry->expects($this->once())
@@ -172,14 +172,14 @@ public function testApplyWithNoIdAndDataOptional()
172172
$this->assertYieldEquals([null], $ret);
173173
}
174174

175-
public function testApplyWithStripNulls()
175+
public function testResolveWithStripNulls()
176176
{
177177
$registry = $this->getMockBuilder(ManagerRegistry::class)->getMock();
178178
$converter = new EntityValueResolver($registry);
179179

180180
$request = new Request();
181181
$request->attributes->set('arg', null);
182-
$argument = $this->createArgument('stdClass', new MapEntity(mapping: ['arg' => 'arg'], stripNull: true), 'arg', true);
182+
$argument = $this->createArgument('stdClass', new MapEntity(stripNull: true), 'arg', true);
183183

184184
$classMetadata = $this->getMockBuilder(ClassMetadata::class)->getMock();
185185
$manager = $this->getMockBuilder(ObjectManager::class)->getMock();
@@ -209,7 +209,7 @@ public function testApplyWithStripNulls()
209209
/**
210210
* @dataProvider idsProvider
211211
*/
212-
public function testApplyWithId(string|int $id)
212+
public function testResolveWithId(string|int $id)
213213
{
214214
$registry = $this->getMockBuilder(ManagerRegistry::class)->getMock();
215215
$converter = new EntityValueResolver($registry);
@@ -241,7 +241,7 @@ public function testApplyWithId(string|int $id)
241241
$this->assertYieldEquals([$object], $ret);
242242
}
243243

244-
public function testApplyWithNullId()
244+
public function testResolveWithNullId()
245245
{
246246
$registry = $this->getMockBuilder(ManagerRegistry::class)->getMock();
247247
$registry->expects($this->once())
@@ -260,7 +260,7 @@ public function testApplyWithNullId()
260260
$this->assertYieldEquals([null], $ret);
261261
}
262262

263-
public function testApplyWithConversionFailedException()
263+
public function testResolveWithConversionFailedException()
264264
{
265265
$registry = $this->getMockBuilder(ManagerRegistry::class)->getMock();
266266
$converter = new EntityValueResolver($registry);
@@ -320,7 +320,7 @@ public function idsProvider(): iterable
320320
yield ['foo'];
321321
}
322322

323-
public function testApplyGuessOptional()
323+
public function testResolveGuessOptional()
324324
{
325325
$registry = $this->getMockBuilder(ManagerRegistry::class)->getMock();
326326
$converter = new EntityValueResolver($registry);
@@ -353,7 +353,7 @@ public function testApplyGuessOptional()
353353
$this->assertYieldEquals([null], $ret);
354354
}
355355

356-
public function testApplyWithMappingAndExclude()
356+
public function testResolveWithMappingAndExclude()
357357
{
358358
$registry = $this->getMockBuilder(ManagerRegistry::class)->getMock();
359359
$converter = new EntityValueResolver($registry);

0 commit comments

Comments
 (0)
0