platform/api/symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.yaml

89 lines
2.9 KiB
YAML
Raw Normal View History

2024-09-02 17:44:11 +00:00
name: AttributeBagTest
class_comment: '# * Tests AttributeBag.
# *
# * @author Drak <drak@zikula.org>'
dependencies:
- name: TestCase
type: class
source: PHPUnit\Framework\TestCase
- name: AttributeBag
type: class
source: Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag
properties: []
methods:
- name: testHas
visibility: public
parameters:
- name: key
- name: value
- name: exists
comment: "# * Tests AttributeBag.\n# *\n# * @author Drak <drak@zikula.org>\n# */\n\
# class AttributeBagTest extends TestCase\n# {\n# private array $array = [];\n\
# \n# private ?AttributeBag $bag = null;\n# \n# protected function setUp(): void\n\
# {\n# $this->array = [\n# 'hello' => 'world',\n# 'always' => 'be happy',\n# 'user.login'\
\ => 'drak',\n# 'csrf.token' => [\n# 'a' => '1234',\n# 'b' => '4321',\n# ],\n\
# 'category' => [\n# 'fishing' => [\n# 'first' => 'cod',\n# 'second' => 'sole',\n\
# ],\n# ],\n# ];\n# $this->bag = new AttributeBag('_sf');\n# $this->bag->initialize($this->array);\n\
# }\n# \n# protected function tearDown(): void\n# {\n# $this->bag = null;\n# $this->array\
\ = [];\n# }\n# \n# public function testInitialize()\n# {\n# $bag = new AttributeBag();\n\
# $bag->initialize($this->array);\n# $this->assertEquals($this->array, $bag->all());\n\
# $array = ['should' => 'change'];\n# $bag->initialize($array);\n# $this->assertEquals($array,\
\ $bag->all());\n# }\n# \n# public function testGetStorageKey()\n# {\n# $this->assertEquals('_sf',\
\ $this->bag->getStorageKey());\n# $attributeBag = new AttributeBag('test');\n\
# $this->assertEquals('test', $attributeBag->getStorageKey());\n# }\n# \n# public\
\ function testGetSetName()\n# {\n# $this->assertEquals('attributes', $this->bag->getName());\n\
# $this->bag->setName('foo');\n# $this->assertEquals('foo', $this->bag->getName());\n\
# }\n# \n# /**\n# * @dataProvider attributesProvider"
- name: testGet
visibility: public
parameters:
- name: key
- name: value
- name: expected
comment: '# * @dataProvider attributesProvider'
- name: testGetDefaults
visibility: public
parameters: []
comment: null
- name: testSet
visibility: public
parameters:
- name: key
- name: value
- name: expected
comment: '# * @dataProvider attributesProvider'
- name: testAll
visibility: public
parameters: []
comment: null
- name: testReplace
visibility: public
parameters: []
comment: null
- name: testRemove
visibility: public
parameters: []
comment: null
- name: testClear
visibility: public
parameters: []
comment: null
- name: attributesProvider
visibility: public
parameters: []
comment: null
- name: testGetIterator
visibility: public
parameters: []
comment: null
- name: testCount
visibility: public
parameters: []
comment: null
traits:
- PHPUnit\Framework\TestCase
- Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag
interfaces: []