/** * @test */ public function shouldParseArrayWithSimpleType() { //given $method = ParameterFactory::createParameterForSimpleArray(); //when $types = $this->_rpcEncoded->typeParameters($method); //then $type = $types[0]; $this->assertEquals('ArrayOfNames', $type->getName()); $this->assertEquals('xsd:string[]', $type->getArrayType()); $this->assertNull($type->getComplex()); }
/** * @test */ public function shouldParseArrayWithSimpleType() { //given $method = ParameterFactory::createParameterForSimpleArray('method'); //when $types = $this->_documentLiteralWrapped->typeParameters($method); //then $type = $types[0]; // convention 4, input wrapper element name should match with Operation name $this->assertEquals('method', $type->getName()); $this->assertEquals(array(array('type' => 'type', 'value' => 'ns:ArrayOfNames', 'name' => 'names')), $type->getElementAttributes()); Assert::thatArray($type->getComplex())->onMethod('getName')->containsExactly('ArrayOfNames'); Assert::thatArray($type->getComplex())->onMethod('getArrayType')->containsExactly('xsd:string[]'); }