Skip to content

Commit 4f3069b

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: Use createMock() instead of a getter [ErrorHandler] Fix strpos error when trying to call a method without a name use proper keys to not override appended files Fix console logger according to PSR-3
2 parents b9fc409 + c886bae commit 4f3069b

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

Tests/FormFactoryTest.php

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function testCreateNamedBuilderWithTypeName()
7676
{
7777
$options = ['a' => '1', 'b' => '2'];
7878
$resolvedOptions = ['a' => '2', 'b' => '3'];
79-
$resolvedType = $this->getMockResolvedType();
79+
$resolvedType = $this->createMock(ResolvedFormTypeInterface::class);
8080

8181
$this->registry->expects($this->once())
8282
->method('getType')
@@ -104,7 +104,7 @@ public function testCreateNamedBuilderFillsDataOption()
104104
$givenOptions = ['a' => '1', 'b' => '2'];
105105
$expectedOptions = array_merge($givenOptions, ['data' => 'DATA']);
106106
$resolvedOptions = ['a' => '2', 'b' => '3', 'data' => 'DATA'];
107-
$resolvedType = $this->getMockResolvedType();
107+
$resolvedType = $this->createMock(ResolvedFormTypeInterface::class);
108108

109109
$this->registry->expects($this->once())
110110
->method('getType')
@@ -131,7 +131,7 @@ public function testCreateNamedBuilderDoesNotOverrideExistingDataOption()
131131
{
132132
$options = ['a' => '1', 'b' => '2', 'data' => 'CUSTOM'];
133133
$resolvedOptions = ['a' => '2', 'b' => '3', 'data' => 'CUSTOM'];
134-
$resolvedType = $this->getMockResolvedType();
134+
$resolvedType = $this->createMock(ResolvedFormTypeInterface::class);
135135

136136
$this->registry->expects($this->once())
137137
->method('getType')
@@ -196,7 +196,7 @@ public function testCreateNamed()
196196
{
197197
$options = ['a' => '1', 'b' => '2'];
198198
$resolvedOptions = ['a' => '2', 'b' => '3'];
199-
$resolvedType = $this->getMockResolvedType();
199+
$resolvedType = $this->createMock(ResolvedFormTypeInterface::class);
200200

201201
$this->registry->expects($this->once())
202202
->method('getType')
@@ -470,9 +470,4 @@ private function getMockFactory(array $methods = [])
470470
->setConstructorArgs([$this->registry])
471471
->getMock();
472472
}
473-
474-
private function getMockResolvedType()
475-
{
476-
return $this->createMock(ResolvedFormTypeInterface::class);
477-
}
478473
}

0 commit comments

Comments
 (0)