/** * @test */ public function shouldParseReturnSimpleObject() { //given $parameter = ParameterFactory::createReturnForSimpleObject('method'); //when $element = $this->_documentLiteralWrapped->typeReturning($parameter); //then $this->assertEquals('methodResponse', $element->getName()); $this->assertEquals(array(array('type' => 'element', 'value' => 'ns:Info', 'name' => 'info')), $element->getElementAttributes()); Assert::thatArray($element->getComplex())->onMethod('getName')->containsExactly('Info'); Assert::thatArray($element->getComplex())->onMethod('getElementAttributes')->containsKeyAndValue(array(array(array('type' => 'type', 'value' => 'xsd:string', 'name' => 'name'), array('type' => 'type', 'value' => 'xsd:int', 'name' => 'age')))); }