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 cb5a255

Browse filesBrowse files
minor #30972 [Form] Fix tests (chalasr)
This PR was merged into the 3.4 branch. Discussion ---------- [Form] Fix tests | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a <!-- Write a short README entry for your feature/bugfix here (replace this comment block.) This will help people understand your PR and can be used as a start of the Doc PR. Additionally: - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. --> Commits ------- 35418be [Form] Fix tests
2 parents d8b03ee + 35418be commit cb5a255
Copy full SHA for cb5a255

File tree

1 file changed

+10
-0
lines changed
Filter options

1 file changed

+10
-0
lines changed

‎src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Extension/Core/Type/FileTypeTest.php
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,26 @@
1111

1212
namespace Symfony\Component\Form\Tests\Extension\Core\Type;
1313

14+
use Symfony\Component\Form\Extension\Core\CoreExtension;
1415
use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler;
1516
use Symfony\Component\Form\NativeRequestHandler;
1617
use Symfony\Component\Form\RequestHandlerInterface;
1718
use Symfony\Component\HttpFoundation\File\File;
1819
use Symfony\Component\HttpFoundation\File\UploadedFile;
20+
use Symfony\Component\Translation\TranslatorInterface;
1921

2022
class FileTypeTest extends BaseTypeTest
2123
{
2224
const TESTED_TYPE = 'Symfony\Component\Form\Extension\Core\Type\FileType';
2325

26+
protected function getExtensions()
27+
{
28+
$translator = $this->createMock(TranslatorInterface::class);
29+
$translator->expects($this->any())->method('trans')->willReturnArgument(0);
30+
31+
return array_merge(parent::getExtensions(), [new CoreExtension(null, null, $translator)]);
32+
}
33+
2434
// https://github.com/symfony/symfony/pull/5028
2535
public function testSetData()
2636
{

0 commit comments

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