111 lines
3.7 KiB
YAML
111 lines
3.7 KiB
YAML
name: OrderedHashMapTest
|
|
class_comment: '# * @author Bernhard Schussek <bschussek@gmail.com>'
|
|
dependencies:
|
|
- name: TestCase
|
|
type: class
|
|
source: PHPUnit\Framework\TestCase
|
|
- name: OrderedHashMap
|
|
type: class
|
|
source: Symfony\Component\Form\Util\OrderedHashMap
|
|
properties: []
|
|
methods:
|
|
- name: testUpdateDoesNotChangeElementPosition
|
|
visibility: public
|
|
parameters: []
|
|
comment: "# * @author Bernhard Schussek <bschussek@gmail.com>\n# */\n# class OrderedHashMapTest\
|
|
\ extends TestCase\n# {\n# public function testGet()\n# {\n# $map = new OrderedHashMap();\n\
|
|
# $map['first'] = 1;\n# \n# $this->assertSame(1, $map['first']);\n# }\n# \n# public\
|
|
\ function testGetNonExistingFails()\n# {\n# $this->expectException(\\OutOfBoundsException::class);\n\
|
|
# $map = new OrderedHashMap();\n# \n# $map['first'];\n# }\n# \n# public function\
|
|
\ testInsertStringKeys()\n# {\n# $map = new OrderedHashMap();\n# $map['first']\
|
|
\ = 1;\n# $map['second'] = 2;\n# \n# $this->assertSame(['first' => 1, 'second'\
|
|
\ => 2], iterator_to_array($map));\n# }\n# \n# public function testInsertNullKeys()\n\
|
|
# {\n# $map = new OrderedHashMap();\n# $map[] = 1;\n# $map['foo'] = 2;\n# $map[]\
|
|
\ = 3;\n# \n# $this->assertSame(['0' => 1, 'foo' => 2, '1' => 3], iterator_to_array($map));\n\
|
|
# }\n# \n# public function testInsertLooselyEqualKeys()\n# {\n# $map = new OrderedHashMap();\n\
|
|
# $map['1 as a string'] = '1 as a string';\n# $map[1] = 1;\n# \n# $this->assertSame(['1\
|
|
\ as a string' => '1 as a string', 1 => 1], iterator_to_array($map));\n# }\n#\
|
|
\ \n# /**\n# * Updates should not change the position of an element, otherwise\
|
|
\ we could\n# * turn foreach loops into endless loops if they change the current\n\
|
|
# * element.\n# *\n# * foreach ($map as $index => $value) {\n# * $map[$index]\
|
|
\ = $value + 1;\n# * }\n# *\n# * And we don't want this, right? :)"
|
|
- name: testIsset
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testIssetReturnsFalseForNonExisting
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testIssetReturnsFalseForNull
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testUnset
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testUnsetFromLooselyEqualKeysHashMap
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testUnsetNonExistingSucceeds
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testEmptyIteration
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testIterationSupportsInsertion
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testIterationSupportsDeletionAndInsertion
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testIterationSupportsDeletionOfCurrentElement
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testIterationIgnoresReplacementOfCurrentElement
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testIterationSupportsDeletionOfCurrentAndLastElement
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testIterationIgnoresReplacementOfCurrentAndLastElement
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testIterationSupportsDeletionOfPreviousElement
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testIterationIgnoresReplacementOfPreviousElement
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testIterationSupportsDeletionOfMultiplePreviousElements
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testParallelIteration
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testKeysAreString
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
- name: testCount
|
|
visibility: public
|
|
parameters: []
|
|
comment: null
|
|
traits:
|
|
- PHPUnit\Framework\TestCase
|
|
- Symfony\Component\Form\Util\OrderedHashMap
|
|
interfaces: []
|