Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Add support of xsd:date #31

Merged
merged 1 commit into from
Jan 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Wsdl.php
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,9 @@ public function getType($type)
case 'mixed':
return self::XSD_NS . ':anyType';

case 'date':
return self::XSD_NS . ':date';

case 'void':
return '';

Expand Down
2 changes: 2 additions & 0 deletions test/WsdlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,7 @@ public function testGetType()
$this->assertEquals('soap-enc:Array', $this->wsdl->getType('array'), 'soap-enc:Array detection failed.');
$this->assertEquals('xsd:struct', $this->wsdl->getType('object'), 'xsd:struct detection failed.');
$this->assertEquals('xsd:anyType', $this->wsdl->getType('mixed'), 'xsd:anyType detection failed.');
$this->assertEquals('xsd:date', $this->wsdl->getType('date'), 'xsd:date detection failed.');
$this->assertEquals('', $this->wsdl->getType('void'), 'void detection failed.');
}

Expand Down Expand Up @@ -787,6 +788,7 @@ public function testCaseOfDocBlockParamsDosNotMatterForSoapTypeDetectionZf3910()
$this->assertEquals("xsd:int", $this->wsdl->getType("INTEGER"));
$this->assertEquals("xsd:float", $this->wsdl->getType("FLOAT"));
$this->assertEquals("xsd:double", $this->wsdl->getType("douBLE"));
$this->assertEquals("xsd:date", $this->wsdl->getType("daTe"));

$this->assertEquals("xsd:long", $this->wsdl->getType("long"));
}
Expand Down