public function testIncludesNameInToArrayWhenItemsAttributeHasName() { $p = new Parameter(array('type' => 'array', 'name' => 'Abc', 'items' => array('name' => 'Foo', 'type' => 'object'))); $result = $p->toArray(); $this->assertEquals(array('type' => 'array', 'items' => array('name' => 'Foo', 'type' => 'object', 'additionalProperties' => true)), $result); }