Skip to content

Commit

Permalink
[Form] Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Chalas committed Apr 7, 2019
1 parent c82e2df commit 571e13a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Expand Up @@ -69,7 +69,7 @@ protected function loadTypes()
new Type\TimeType(),
new Type\TimezoneType(),
new Type\UrlType(),
new Type\FileType(),
new Type\FileType($this->translator),
new Type\ButtonType(),
new Type\SubmitType(),
new Type\ResetType(),
Expand Down
Expand Up @@ -11,16 +11,26 @@

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

use Symfony\Component\Form\Extension\Core\CoreExtension;
use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler;
use Symfony\Component\Form\NativeRequestHandler;
use Symfony\Component\Form\RequestHandlerInterface;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\Translation\TranslatorInterface;

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

protected function getExtensions()
{
$translator = $this->createMock(TranslatorInterface::class);
$translator->expects($this->any())->method('trans')->willReturnArgument(0);

return array_merge(parent::getExtensions(), [new CoreExtension(null, null, $translator)]);
}

// https://github.com/symfony/symfony/pull/5028
public function testSetData()
{
Expand Down

0 comments on commit 571e13a

Please sign in to comment.