Skip to content

Commit 7201b06

Browse files
authored
Merge pull request #4 from veewee/envelope-xmlns
Add envelope xmlns namespaces
2 parents 90c9b94 + 9a9553a commit 7201b06

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

src/Xmlns.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,14 @@ public static function xsd(): XmlXmlns
2727
{
2828
return XmlXmlns::load('http://www.w3.org/2001/XMLSchema');
2929
}
30+
31+
public static function soap11Envelope(): XmlXmlns
32+
{
33+
return XmlXmlns::load('http://schemas.xmlsoap.org/soap/envelope/');
34+
}
35+
36+
public static function soap12Envelope(): XmlXmlns
37+
{
38+
return XmlXmlns::load('http://www.w3.org/2003/05/soap-envelope/');
39+
}
3040
}

tests/Unit/XmlnsTest.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,27 @@ public function provideKnownXmlnses()
2424
{
2525
yield 'wsdl' => [
2626
static fn () => Xmlns::wsdl(),
27-
'http://schemas.xmlsoap.org/wsdl/'
27+
'http://schemas.xmlsoap.org/wsdl/',
2828
];
2929
yield 'soap' => [
3030
static fn () => Xmlns::soap(),
31-
'http://schemas.xmlsoap.org/wsdl/soap/'
31+
'http://schemas.xmlsoap.org/wsdl/soap/',
3232
];
3333
yield 'soap12' => [
3434
static fn () => Xmlns::soap12(),
35-
'http://schemas.xmlsoap.org/wsdl/soap12/'
35+
'http://schemas.xmlsoap.org/wsdl/soap12/',
3636
];
3737
yield 'xsd' => [
3838
static fn () => Xmlns::xsd(),
39-
'http://www.w3.org/2001/XMLSchema'
39+
'http://www.w3.org/2001/XMLSchema',
40+
];
41+
yield 'envelope11' => [
42+
static fn () => Xmlns::soap11Envelope(),
43+
'http://schemas.xmlsoap.org/soap/envelope/',
44+
];
45+
yield 'envelope12' => [
46+
static fn () => Xmlns::soap12Envelope(),
47+
'http://www.w3.org/2003/05/soap-envelope/',
4048
];
4149
}
4250
}

0 commit comments

Comments
 (0)