platform/api/symfony/Component/HttpKernel/Tests/Controller/ArgumentResolver/UploadedFileValueResolverTest.yaml

130 lines
4.8 KiB
YAML
Raw Normal View History

2024-09-02 17:44:11 +00:00
name: UploadedFileValueResolverTest
class_comment: null
dependencies:
- name: TestCase
type: class
source: PHPUnit\Framework\TestCase
- name: UploadedFile
type: class
source: Symfony\Component\HttpFoundation\File\UploadedFile
- name: Request
type: class
source: Symfony\Component\HttpFoundation\Request
- name: MapUploadedFile
type: class
source: Symfony\Component\HttpKernel\Attribute\MapUploadedFile
- name: RequestPayloadValueResolver
type: class
source: Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestPayloadValueResolver
- name: ArgumentMetadata
type: class
source: Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata
- name: ControllerArgumentsEvent
type: class
source: Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent
- name: HttpException
type: class
source: Symfony\Component\HttpKernel\Exception\HttpException
- name: HttpKernelInterface
type: class
source: Symfony\Component\HttpKernel\HttpKernelInterface
- name: Serializer
type: class
source: Symfony\Component\Serializer\Serializer
- name: Assert
type: class
source: Symfony\Component\Validator\Constraints
- name: ValidatorBuilder
type: class
source: Symfony\Component\Validator\ValidatorBuilder
properties: []
methods:
- name: testDefaults
visibility: public
parameters:
- name: resolver
- name: request
comment: '# * @dataProvider provideContext'
- name: testEmpty
visibility: public
parameters:
- name: resolver
- name: request
comment: "# @var UploadedFile $data */\n# $data = $event->getArguments()[0];\n#\
\ \n# $this->assertInstanceOf(UploadedFile::class, $data);\n# $this->assertSame('file-small.txt',\
\ $data->getFilename());\n# $this->assertSame(36, $data->getSize());\n# }\n# \n\
# /**\n# * @dataProvider provideContext"
- name: testCustomName
visibility: public
parameters:
- name: resolver
- name: request
comment: '# * @dataProvider provideContext'
- name: testConstraintsWithoutViolation
visibility: public
parameters:
- name: resolver
- name: request
comment: "# @var UploadedFile $data */\n# $data = $event->getArguments()[0];\n#\
\ \n# $this->assertInstanceOf(UploadedFile::class, $data);\n# $this->assertSame('file-big.txt',\
\ $data->getFilename());\n# $this->assertSame(71, $data->getSize());\n# }\n# \n\
# /**\n# * @dataProvider provideContext"
- name: testConstraintsWithViolation
visibility: public
parameters:
- name: resolver
- name: request
comment: "# @var UploadedFile $data */\n# $data = $event->getArguments()[0];\n#\
\ \n# $this->assertInstanceOf(UploadedFile::class, $data);\n# $this->assertSame('file-big.txt',\
\ $data->getFilename());\n# $this->assertSame(71, $data->getSize());\n# }\n# \n\
# /**\n# * @dataProvider provideContext"
- name: testMultipleFilesArray
visibility: public
parameters:
- name: resolver
- name: request
comment: '# * @dataProvider provideContext'
- name: testMultipleFilesArrayConstraints
visibility: public
parameters:
- name: resolver
- name: request
comment: "# @var UploadedFile[] $data */\n# $data = $event->getArguments()[0];\n\
# \n# $this->assertCount(2, $data);\n# $this->assertSame('file-small.txt', $data[0]->getFilename());\n\
# $this->assertSame(36, $data[0]->getSize());\n# $this->assertSame('file-big.txt',\
\ $data[1]->getFilename());\n# $this->assertSame(71, $data[1]->getSize());\n#\
\ }\n# \n# /**\n# * @dataProvider provideContext"
- name: testMultipleFilesVariadic
visibility: public
parameters:
- name: resolver
- name: request
comment: '# * @dataProvider provideContext'
- name: testMultipleFilesVariadicConstraints
visibility: public
parameters:
- name: resolver
- name: request
comment: "# @var UploadedFile[] $data */\n# $data = $event->getArguments()[0];\n\
# \n# $this->assertCount(2, $data);\n# $this->assertSame('file-small.txt', $data[0]->getFilename());\n\
# $this->assertSame(36, $data[0]->getSize());\n# $this->assertSame('file-big.txt',\
\ $data[1]->getFilename());\n# $this->assertSame(71, $data[1]->getSize());\n#\
\ }\n# \n# /**\n# * @dataProvider provideContext"
- name: provideContext
visibility: public
parameters: []
comment: null
traits:
- PHPUnit\Framework\TestCase
- Symfony\Component\HttpFoundation\File\UploadedFile
- Symfony\Component\HttpFoundation\Request
- Symfony\Component\HttpKernel\Attribute\MapUploadedFile
- Symfony\Component\HttpKernel\Controller\ArgumentResolver\RequestPayloadValueResolver
- Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata
- Symfony\Component\HttpKernel\Event\ControllerArgumentsEvent
- Symfony\Component\HttpKernel\Exception\HttpException
- Symfony\Component\HttpKernel\HttpKernelInterface
- Symfony\Component\Serializer\Serializer
- Symfony\Component\Validator\ValidatorBuilder
interfaces: []