From 14cfca64ea07227ef0f6806d3d1856c35ebcf89e Mon Sep 17 00:00:00 2001 From: Toon Verwerft Date: Fri, 28 Jan 2022 08:41:55 +0100 Subject: [PATCH] Add various tests --- .../Configurator/FlattenXsdImportsTest.php | 12 +++++++++ tests/fixtures/flattening/grouped-xsd.wsdl | 12 +++++++++ tests/fixtures/flattening/redefine-xsd.wsdl | 22 ++++++++++++++++ .../flattening/result/grouped-xsd-result.wsdl | 24 ++++++++++++++++++ .../result/redefine-xsd-result.wsdl | 25 +++++++++++++++++++ .../flattening/result/tnsless-xsd-result.wsdl | 19 ++++++++++++++ tests/fixtures/flattening/tnsless-xsd.wsdl | 13 ++++++++++ .../fixtures/flattening/xsd/store1-extras.xsd | 7 ++++++ tests/fixtures/flattening/xsd/tnsless.xsd | 7 ++++++ 9 files changed, 141 insertions(+) create mode 100644 tests/fixtures/flattening/grouped-xsd.wsdl create mode 100644 tests/fixtures/flattening/redefine-xsd.wsdl create mode 100644 tests/fixtures/flattening/result/grouped-xsd-result.wsdl create mode 100644 tests/fixtures/flattening/result/redefine-xsd-result.wsdl create mode 100644 tests/fixtures/flattening/result/tnsless-xsd-result.wsdl create mode 100644 tests/fixtures/flattening/tnsless-xsd.wsdl create mode 100644 tests/fixtures/flattening/xsd/store1-extras.xsd create mode 100644 tests/fixtures/flattening/xsd/tnsless.xsd diff --git a/tests/Unit/Xml/Configurator/FlattenXsdImportsTest.php b/tests/Unit/Xml/Configurator/FlattenXsdImportsTest.php index bd78f6b..9d9ae90 100644 --- a/tests/Unit/Xml/Configurator/FlattenXsdImportsTest.php +++ b/tests/Unit/Xml/Configurator/FlattenXsdImportsTest.php @@ -46,5 +46,17 @@ public function provideTestCases() 'wsdl' => FIXTURE_DIR.'/flattening/circular-xsd.wsdl', 'expected' => Document::fromXmlFile(FIXTURE_DIR.'/flattening/result/circular-xsd-result.wsdl', comparable()), ]; + yield 'redefine-xsd' => [ + 'wsdl' => FIXTURE_DIR.'/flattening/redefine-xsd.wsdl', + 'expected' => Document::fromXmlFile(FIXTURE_DIR.'/flattening/result/redefine-xsd-result.wsdl', comparable()), + ]; + yield 'tnsless-xsd' => [ + 'wsdl' => FIXTURE_DIR.'/flattening/tnsless-xsd.wsdl', + 'expected' => Document::fromXmlFile(FIXTURE_DIR.'/flattening/result/tnsless-xsd-result.wsdl', comparable()), + ]; + yield 'grouped-xsd' => [ + 'wsdl' => FIXTURE_DIR.'/flattening/grouped-xsd.wsdl', + 'expected' => Document::fromXmlFile(FIXTURE_DIR.'/flattening/result/grouped-xsd-result.wsdl', comparable()), + ]; } } diff --git a/tests/fixtures/flattening/grouped-xsd.wsdl b/tests/fixtures/flattening/grouped-xsd.wsdl new file mode 100644 index 0000000..658a712 --- /dev/null +++ b/tests/fixtures/flattening/grouped-xsd.wsdl @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/tests/fixtures/flattening/redefine-xsd.wsdl b/tests/fixtures/flattening/redefine-xsd.wsdl new file mode 100644 index 0000000..5b4b3ab --- /dev/null +++ b/tests/fixtures/flattening/redefine-xsd.wsdl @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + diff --git a/tests/fixtures/flattening/result/grouped-xsd-result.wsdl b/tests/fixtures/flattening/result/grouped-xsd-result.wsdl new file mode 100644 index 0000000..64a6e54 --- /dev/null +++ b/tests/fixtures/flattening/result/grouped-xsd-result.wsdl @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/fixtures/flattening/result/redefine-xsd-result.wsdl b/tests/fixtures/flattening/result/redefine-xsd-result.wsdl new file mode 100644 index 0000000..088279d --- /dev/null +++ b/tests/fixtures/flattening/result/redefine-xsd-result.wsdl @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/fixtures/flattening/result/tnsless-xsd-result.wsdl b/tests/fixtures/flattening/result/tnsless-xsd-result.wsdl new file mode 100644 index 0000000..aba89a5 --- /dev/null +++ b/tests/fixtures/flattening/result/tnsless-xsd-result.wsdl @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff --git a/tests/fixtures/flattening/tnsless-xsd.wsdl b/tests/fixtures/flattening/tnsless-xsd.wsdl new file mode 100644 index 0000000..7350809 --- /dev/null +++ b/tests/fixtures/flattening/tnsless-xsd.wsdl @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/tests/fixtures/flattening/xsd/store1-extras.xsd b/tests/fixtures/flattening/xsd/store1-extras.xsd new file mode 100644 index 0000000..490be3c --- /dev/null +++ b/tests/fixtures/flattening/xsd/store1-extras.xsd @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/tests/fixtures/flattening/xsd/tnsless.xsd b/tests/fixtures/flattening/xsd/tnsless.xsd new file mode 100644 index 0000000..6c77960 --- /dev/null +++ b/tests/fixtures/flattening/xsd/tnsless.xsd @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file