From c8d360e0955a3d7a72df109c4043d7d9efd0fe99 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Fri, 16 Sep 2022 14:09:17 +0200 Subject: [PATCH] Use PSR autoload mechanism for tests --- composer.json | 6 ++++++ phpunit.xml.dist | 4 ++-- .../AbstractTestReader.php | 7 ++++--- .../AbstractWebServerEmbeddedTest.php | 4 ++-- .../Collection/CollectionTest.php | 3 ++- .../ComplexType/FootnotePropertiesTest.php | 3 ++- .../ComplexType/ProofStateTest.php | 3 ++- .../Element/AbstractElementTest.php | 2 +- .../Element/BookmarkTest.php | 4 +++- .../{PhpWord => PhpWordTests}/Element/CellTest.php | 5 +++-- .../Element/CheckBoxTest.php | 3 ++- .../Element/CommentTest.php | 4 +++- .../Element/FieldTest.php | 4 +++- .../Element/FooterTest.php | 5 +++-- .../Element/FootnoteTest.php | 4 +++- .../Element/HeaderTest.php | 5 +++-- .../Element/ImageTest.php | 5 +++-- .../{PhpWord => PhpWordTests}/Element/LineTest.php | 4 +++- .../{PhpWord => PhpWordTests}/Element/LinkTest.php | 3 ++- .../Element/ListItemRunTest.php | 4 +++- .../Element/ListItemTest.php | 4 +++- .../Element/ObjectTest.php | 4 +++- .../Element/PageBreakTest.php | 4 +++- .../Element/PreserveTextTest.php | 3 ++- .../{PhpWord => PhpWordTests}/Element/RowTest.php | 4 +++- .../{PhpWord => PhpWordTests}/Element/SDTTest.php | 3 ++- .../Element/SectionTest.php | 4 +++- .../{PhpWord => PhpWordTests}/Element/TOCTest.php | 4 +++- .../Element/TableTest.php | 4 +++- .../Element/TextBoxTest.php | 4 +++- .../Element/TextBreakTest.php | 3 ++- .../Element/TextRunTest.php | 3 ++- .../{PhpWord => PhpWordTests}/Element/TextTest.php | 3 ++- .../Element/TitleTest.php | 5 ++++- .../Element/TrackChangeTest.php | 4 +++- .../Escaper/RtfEscaper2Test.php | 2 +- .../Exception/CopyFileExceptionTest.php | 4 +++- .../Exception/CreateTemporaryFileExceptionTest.php | 4 +++- .../Exception/ExceptionTest.php | 11 +++++++---- .../Exception/InvalidImageExceptionTest.php | 4 +++- .../Exception/InvalidStyleExceptionTest.php | 4 +++- .../UnsupportedImageTypeExceptionTest.php | 6 +++--- tests/{PhpWord => PhpWordTests}/IOFactoryTest.php | 5 ++++- tests/{PhpWord => PhpWordTests}/MediaTest.php | 3 ++- .../Metadata/DocInfoTest.php | 4 +++- .../Metadata/SettingsTest.php | 4 +++- tests/{PhpWord => PhpWordTests}/PhpWordTest.php | 5 ++++- .../{PhpWord => PhpWordTests}/Reader/HTMLTest.php | 2 +- .../{PhpWord => PhpWordTests}/Reader/MsDocTest.php | 3 ++- .../Reader/ODTextTest.php | 2 +- tests/{PhpWord => PhpWordTests}/Reader/RTFTest.php | 2 +- .../Reader/Word2007/ElementTest.php | 4 ++-- .../Reader/Word2007/PartTest.php | 4 ++-- .../Reader/Word2007/StyleTest.php | 4 ++-- .../Reader/Word2007Test.php | 5 +++-- tests/{PhpWord => PhpWordTests}/SettingsTest.php | 5 ++++- .../Shared/ConverterTest.php | 4 +++- .../Shared/DrawingTest.php | 4 +++- .../{PhpWord => PhpWordTests}/Shared/HtmlTest.php | 7 ++++--- .../Shared/Microsoft/PasswordEncoderTest.php | 6 +++--- .../{PhpWord => PhpWordTests}/Shared/TextTest.php | 4 +++- .../Shared/XMLReaderTest.php | 3 ++- .../Shared/XMLWriterTest.php | 4 +++- .../Shared/ZipArchiveTest.php | 3 ++- .../Style/AbstractStyleTest.php | 2 +- tests/{PhpWord => PhpWordTests}/Style/CellTest.php | 3 ++- .../{PhpWord => PhpWordTests}/Style/ChartTest.php | 4 +++- tests/{PhpWord => PhpWordTests}/Style/FontTest.php | 6 ++++-- .../{PhpWord => PhpWordTests}/Style/ImageTest.php | 3 ++- .../Style/IndentationTest.php | 4 +++- .../Style/LanguageTest.php | 3 ++- .../Style/LineNumberingTest.php | 4 +++- tests/{PhpWord => PhpWordTests}/Style/LineTest.php | 4 +++- .../Style/ListItemTest.php | 4 +++- .../Style/NumberingLevelTest.php | 3 ++- .../Style/NumberingTest.php | 4 +++- .../{PhpWord => PhpWordTests}/Style/PaperTest.php | 5 +++-- .../Style/ParagraphTest.php | 6 ++++-- tests/{PhpWord => PhpWordTests}/Style/RowTest.php | 4 +++- .../Style/SectionTest.php | 3 ++- .../Style/ShadingTest.php | 4 +++- .../Style/SpacingTest.php | 4 +++- tests/{PhpWord => PhpWordTests}/Style/TOCTest.php | 4 +++- tests/{PhpWord => PhpWordTests}/Style/TabTest.php | 4 +++- .../Style/TablePositionTest.php | 4 +++- .../{PhpWord => PhpWordTests}/Style/TableTest.php | 4 +++- .../Style/TextBoxTest.php | 3 ++- tests/{PhpWord => PhpWordTests}/StyleTest.php | 3 ++- .../TemplateProcessorTest.php | 6 +++++- .../_includes => PhpWordTests}/TestHelperDOCX.php | 7 +++++-- .../TestableTemplateProcesor.php | 4 +++- .../Writer/HTML/ElementTest.php | 2 +- .../Writer/HTML/PartTest.php | 2 +- .../Writer/HTML/StyleTest.php | 2 +- .../{PhpWord => PhpWordTests}/Writer/HTMLTest.php | 5 +++-- .../Writer/ODText/Element/ImageTest.php | 4 ++-- .../Writer/ODText/ElementTest.php | 4 ++-- .../Writer/ODText/Part/AbstractPartTest.php | 6 +++--- .../Writer/ODText/Part/ContentTest.php | 4 ++-- .../Writer/ODText/Style/FontTest.php | 4 ++-- .../Writer/ODText/Style/ParagraphTest.php | 4 ++-- .../Writer/ODText/Style/SectionTest.php | 4 ++-- .../Writer/ODText/StyleTest.php | 2 +- .../Writer/ODTextTest.php | 3 ++- .../Writer/PDF/DomPDFTest.php | 2 +- .../Writer/PDF/MPDFTest.php | 2 +- .../Writer/PDF/TCPDFTest.php | 2 +- tests/{PhpWord => PhpWordTests}/Writer/PDFTest.php | 3 ++- .../Writer/RTF/ElementTest.php | 2 +- .../Writer/RTF/HeaderFooterTest.php | 2 +- .../Writer/RTF/StyleTest.php | 2 +- tests/{PhpWord => PhpWordTests}/Writer/RTFTest.php | 3 ++- .../Writer/Word2007/Element/ChartTest.php | 4 ++-- .../Writer/Word2007/Element/FormFieldTest.php | 4 ++-- .../Writer/Word2007/ElementTest.php | 4 ++-- .../Writer/Word2007/Part/AbstractPartTest.php | 10 +++------- .../Writer/Word2007/Part/CommentsTest.php | 4 ++-- .../Writer/Word2007/Part/DocumentTest.php | 4 ++-- .../Writer/Word2007/Part/FooterTest.php | 3 ++- .../Writer/Word2007/Part/FootnotesTest.php | 4 ++-- .../Writer/Word2007/Part/HeaderTest.php | 3 ++- .../Writer/Word2007/Part/NumberingTest.php | 4 ++-- .../Writer/Word2007/Part/SettingsTest.php | 4 ++-- .../Writer/Word2007/Part/StylesTest.php | 4 ++-- .../Writer/Word2007/PartTest.php | 2 +- .../Writer/Word2007/Style/FontTest.php | 4 ++-- .../Writer/Word2007/Style/ImageTest.php | 4 ++-- .../Writer/Word2007/Style/ParagraphTest.php | 4 ++-- .../Writer/Word2007/Style/SectionTest.php | 4 ++-- .../Writer/Word2007/Style/TableTest.php | 4 ++-- .../Writer/Word2007/StyleTest.php | 2 +- .../Writer/Word2007Test.php | 7 ++++--- .../_includes => PhpWordTests}/XmlDocument.php | 2 +- .../_files/documents/reader-2011.docx | Bin .../_files/documents/reader.doc | Bin .../_files/documents/reader.docx | Bin .../_files/documents/reader.docx.zip | Bin .../_files/documents/reader.html | 0 .../_files/documents/reader.odt | Bin .../_files/documents/reader.rtf | 0 .../_files/documents/sheet.xls | Bin .../_files/documents/without_table_macros.docx | Bin .../_files/images/PhpWord.png | Bin .../_files/images/alexz-johnson.pcx | Bin .../_files/images/angela_merkel.tif | Bin .../_files/images/duke_nukem.bmp | Bin .../_files/images/earth.jpg | Bin .../_files/images/firefox.png | Bin .../_files/images/mario.gif | Bin .../_files/images/mars.jpg | Bin .../_files/images/mars_noext_jpg | Bin .../_files/images/new-php-logo.png | Bin .../_files/templates/blank.docx | Bin .../_files/templates/clone-delete-block.docx | Bin .../_files/templates/clone-merge.docx | Bin .../templates/corrupted_main_document_part.docx | Bin .../_files/templates/document22-xml.docx | Bin .../_files/templates/header-footer.docx | Bin .../_files/templates/with_table_macros.docx | Bin .../_files/xml/reader.zip | Bin .../_files/xsl/passthrough.xsl | 0 .../_files/xsl/remove_tables_by_needle.xsl | 0 tests/bootstrap.php | 13 ------------- 163 files changed, 330 insertions(+), 201 deletions(-) rename tests/{PhpWord/_includes => PhpWordTests}/AbstractTestReader.php (94%) rename tests/{PhpWord/_includes => PhpWordTests}/AbstractWebServerEmbeddedTest.php (94%) rename tests/{PhpWord => PhpWordTests}/Collection/CollectionTest.php (94%) rename tests/{PhpWord => PhpWordTests}/ComplexType/FootnotePropertiesTest.php (96%) rename tests/{PhpWord => PhpWordTests}/ComplexType/ProofStateTest.php (95%) rename tests/{PhpWord => PhpWordTests}/Element/AbstractElementTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Element/BookmarkTest.php (93%) rename tests/{PhpWord => PhpWordTests}/Element/CellTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Element/CheckBoxTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Element/CommentTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Element/FieldTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Element/FooterTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Element/FootnoteTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Element/HeaderTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Element/ImageTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Element/LineTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Element/LinkTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Element/ListItemRunTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Element/ListItemTest.php (95%) rename tests/{PhpWord => PhpWordTests}/Element/ObjectTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Element/PageBreakTest.php (92%) rename tests/{PhpWord => PhpWordTests}/Element/PreserveTextTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Element/RowTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Element/SDTTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Element/SectionTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Element/TOCTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Element/TableTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Element/TextBoxTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Element/TextBreakTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Element/TextRunTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Element/TextTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Element/TitleTest.php (92%) rename tests/{PhpWord => PhpWordTests}/Element/TrackChangeTest.php (94%) rename tests/{PhpWord => PhpWordTests}/Escaper/RtfEscaper2Test.php (98%) rename tests/{PhpWord => PhpWordTests}/Exception/CopyFileExceptionTest.php (92%) rename tests/{PhpWord => PhpWordTests}/Exception/CreateTemporaryFileExceptionTest.php (91%) rename tests/{PhpWord => PhpWordTests}/Exception/ExceptionTest.php (79%) rename tests/{PhpWord => PhpWordTests}/Exception/InvalidImageExceptionTest.php (92%) rename tests/{PhpWord => PhpWordTests}/Exception/InvalidStyleExceptionTest.php (92%) rename tests/{PhpWord => PhpWordTests}/Exception/UnsupportedImageTypeExceptionTest.php (90%) rename tests/{PhpWord => PhpWordTests}/IOFactoryTest.php (95%) rename tests/{PhpWord => PhpWordTests}/MediaTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Metadata/DocInfoTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Metadata/SettingsTest.php (98%) rename tests/{PhpWord => PhpWordTests}/PhpWordTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Reader/HTMLTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Reader/MsDocTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Reader/ODTextTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Reader/RTFTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Reader/Word2007/ElementTest.php (99%) rename tests/{PhpWord => PhpWordTests}/Reader/Word2007/PartTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Reader/Word2007/StyleTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Reader/Word2007Test.php (95%) rename tests/{PhpWord => PhpWordTests}/SettingsTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Shared/ConverterTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Shared/DrawingTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Shared/HtmlTest.php (99%) rename tests/{PhpWord => PhpWordTests}/Shared/Microsoft/PasswordEncoderTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Shared/TextTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Shared/XMLReaderTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Shared/XMLWriterTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Shared/ZipArchiveTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Style/AbstractStyleTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Style/CellTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Style/ChartTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Style/FontTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Style/ImageTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Style/IndentationTest.php (94%) rename tests/{PhpWord => PhpWordTests}/Style/LanguageTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Style/LineNumberingTest.php (94%) rename tests/{PhpWord => PhpWordTests}/Style/LineTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Style/ListItemTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Style/NumberingLevelTest.php (95%) rename tests/{PhpWord => PhpWordTests}/Style/NumberingTest.php (95%) rename tests/{PhpWord => PhpWordTests}/Style/PaperTest.php (94%) rename tests/{PhpWord => PhpWordTests}/Style/ParagraphTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Style/RowTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Style/SectionTest.php (99%) rename tests/{PhpWord => PhpWordTests}/Style/ShadingTest.php (94%) rename tests/{PhpWord => PhpWordTests}/Style/SpacingTest.php (95%) rename tests/{PhpWord => PhpWordTests}/Style/TOCTest.php (95%) rename tests/{PhpWord => PhpWordTests}/Style/TabTest.php (95%) rename tests/{PhpWord => PhpWordTests}/Style/TablePositionTest.php (95%) rename tests/{PhpWord => PhpWordTests}/Style/TableTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Style/TextBoxTest.php (99%) rename tests/{PhpWord => PhpWordTests}/StyleTest.php (98%) rename tests/{PhpWord => PhpWordTests}/TemplateProcessorTest.php (99%) rename tests/{PhpWord/_includes => PhpWordTests}/TestHelperDOCX.php (94%) rename tests/{PhpWord/_includes => PhpWordTests}/TestableTemplateProcesor.php (96%) rename tests/{PhpWord => PhpWordTests}/Writer/HTML/ElementTest.php (99%) rename tests/{PhpWord => PhpWordTests}/Writer/HTML/PartTest.php (95%) rename tests/{PhpWord => PhpWordTests}/Writer/HTML/StyleTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Writer/HTMLTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Writer/ODText/Element/ImageTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Writer/ODText/ElementTest.php (99%) rename tests/{PhpWord => PhpWordTests}/Writer/ODText/Part/AbstractPartTest.php (84%) rename tests/{PhpWord => PhpWordTests}/Writer/ODText/Part/ContentTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Writer/ODText/Style/FontTest.php (99%) rename tests/{PhpWord => PhpWordTests}/Writer/ODText/Style/ParagraphTest.php (99%) rename tests/{PhpWord => PhpWordTests}/Writer/ODText/Style/SectionTest.php (99%) rename tests/{PhpWord => PhpWordTests}/Writer/ODText/StyleTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Writer/ODTextTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Writer/PDF/DomPDFTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Writer/PDF/MPDFTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Writer/PDF/TCPDFTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Writer/PDFTest.php (95%) rename tests/{PhpWord => PhpWordTests}/Writer/RTF/ElementTest.php (99%) rename tests/{PhpWord => PhpWordTests}/Writer/RTF/HeaderFooterTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Writer/RTF/StyleTest.php (99%) rename tests/{PhpWord => PhpWordTests}/Writer/RTFTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/Element/ChartTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/Element/FormFieldTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/ElementTest.php (99%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/Part/AbstractPartTest.php (75%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/Part/CommentsTest.php (94%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/Part/DocumentTest.php (99%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/Part/FooterTest.php (94%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/Part/FootnotesTest.php (94%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/Part/HeaderTest.php (94%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/Part/NumberingTest.php (95%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/Part/SettingsTest.php (99%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/Part/StylesTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/PartTest.php (96%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/Style/FontTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/Style/ImageTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/Style/ParagraphTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/Style/SectionTest.php (95%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/Style/TableTest.php (98%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007/StyleTest.php (97%) rename tests/{PhpWord => PhpWordTests}/Writer/Word2007Test.php (96%) rename tests/{PhpWord/_includes => PhpWordTests}/XmlDocument.php (99%) rename tests/{PhpWord => PhpWordTests}/_files/documents/reader-2011.docx (100%) rename tests/{PhpWord => PhpWordTests}/_files/documents/reader.doc (100%) rename tests/{PhpWord => PhpWordTests}/_files/documents/reader.docx (100%) rename tests/{PhpWord => PhpWordTests}/_files/documents/reader.docx.zip (100%) rename tests/{PhpWord => PhpWordTests}/_files/documents/reader.html (100%) rename tests/{PhpWord => PhpWordTests}/_files/documents/reader.odt (100%) rename tests/{PhpWord => PhpWordTests}/_files/documents/reader.rtf (100%) rename tests/{PhpWord => PhpWordTests}/_files/documents/sheet.xls (100%) rename tests/{PhpWord => PhpWordTests}/_files/documents/without_table_macros.docx (100%) rename tests/{PhpWord => PhpWordTests}/_files/images/PhpWord.png (100%) rename tests/{PhpWord => PhpWordTests}/_files/images/alexz-johnson.pcx (100%) rename tests/{PhpWord => PhpWordTests}/_files/images/angela_merkel.tif (100%) rename tests/{PhpWord => PhpWordTests}/_files/images/duke_nukem.bmp (100%) rename tests/{PhpWord => PhpWordTests}/_files/images/earth.jpg (100%) rename tests/{PhpWord => PhpWordTests}/_files/images/firefox.png (100%) rename tests/{PhpWord => PhpWordTests}/_files/images/mario.gif (100%) rename tests/{PhpWord => PhpWordTests}/_files/images/mars.jpg (100%) rename tests/{PhpWord => PhpWordTests}/_files/images/mars_noext_jpg (100%) rename tests/{PhpWord => PhpWordTests}/_files/images/new-php-logo.png (100%) rename tests/{PhpWord => PhpWordTests}/_files/templates/blank.docx (100%) rename tests/{PhpWord => PhpWordTests}/_files/templates/clone-delete-block.docx (100%) rename tests/{PhpWord => PhpWordTests}/_files/templates/clone-merge.docx (100%) rename tests/{PhpWord => PhpWordTests}/_files/templates/corrupted_main_document_part.docx (100%) rename tests/{PhpWord => PhpWordTests}/_files/templates/document22-xml.docx (100%) rename tests/{PhpWord => PhpWordTests}/_files/templates/header-footer.docx (100%) rename tests/{PhpWord => PhpWordTests}/_files/templates/with_table_macros.docx (100%) rename tests/{PhpWord => PhpWordTests}/_files/xml/reader.zip (100%) rename tests/{PhpWord => PhpWordTests}/_files/xsl/passthrough.xsl (100%) rename tests/{PhpWord => PhpWordTests}/_files/xsl/remove_tables_by_needle.xsl (100%) diff --git a/composer.json b/composer.json index 5dad8507..da1dbbbd 100644 --- a/composer.json +++ b/composer.json @@ -68,6 +68,7 @@ "require-dev": { "ext-zip": "*", "ext-gd": "*", + "ext-libxml": "*", "dompdf/dompdf": "^2.0", "friendsofphp/php-cs-fixer": "^3.11", "mpdf/mpdf": "^8.1", @@ -90,6 +91,11 @@ "PhpOffice\\PhpWord\\": "src/PhpWord" } }, + "autoload-dev": { + "psr-4": { + "PhpOffice\\PhpWordTests\\": "tests/PhpWordTests" + } + }, "extra": { "branch-alias": { "dev-develop": "0.19-dev" diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5e1d25ba..e3f02121 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -9,14 +9,14 @@ stopOnFailure="false"> - ./tests/PhpWord + ./tests/PhpWordTests ./src - ./src/PhpWord/Shared/PCLZip + ./src/PhpWordTests/Shared/PCLZip diff --git a/tests/PhpWord/_includes/AbstractTestReader.php b/tests/PhpWordTests/AbstractTestReader.php similarity index 94% rename from tests/PhpWord/_includes/AbstractTestReader.php rename to tests/PhpWordTests/AbstractTestReader.php index da83e77f..121a2138 100644 --- a/tests/PhpWord/_includes/AbstractTestReader.php +++ b/tests/PhpWordTests/AbstractTestReader.php @@ -15,8 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord; +namespace PhpOffice\PhpWordTests; +use PhpOffice\PhpWord\PhpWord; use ZipArchive; /** @@ -39,9 +40,9 @@ abstract class AbstractTestReader extends \PHPUnit\Framework\TestCase */ protected function getDocumentFromString(array $partXmls = []) { - $file = __DIR__ . '/../_files/temp.docx'; + $file = __DIR__ . '/_files/temp.docx'; $zip = new ZipArchive(); - $zip->open($file, ZipArchive::CREATE); + $zip->open($file, ZipArchive::CREATE | ZipArchive::OVERWRITE); foreach ($this->parts as $partName => $part) { if (array_key_exists($partName, $partXmls)) { $zip->addFromString("{$partName}.xml", str_replace('{toReplace}', $partXmls[$partName], $this->parts[$partName]['xml'])); diff --git a/tests/PhpWord/_includes/AbstractWebServerEmbeddedTest.php b/tests/PhpWordTests/AbstractWebServerEmbeddedTest.php similarity index 94% rename from tests/PhpWord/_includes/AbstractWebServerEmbeddedTest.php rename to tests/PhpWordTests/AbstractWebServerEmbeddedTest.php index a44fc85f..f291f79b 100644 --- a/tests/PhpWord/_includes/AbstractWebServerEmbeddedTest.php +++ b/tests/PhpWordTests/AbstractWebServerEmbeddedTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord; +namespace PhpOffice\PhpWordTests; use Symfony\Component\Process\Process; @@ -25,7 +25,7 @@ abstract class AbstractWebServerEmbeddedTest extends \PHPUnit\Framework\TestCase public static function setUpBeforeClass(): void { - $commandLine = 'php -S localhost:8080 -t tests/PhpWord/_files'; + $commandLine = 'php -S localhost:8080 -t tests/PhpWordTests/_files'; self::$httpServer = Process::fromShellCommandline($commandLine); self::$httpServer->start(); diff --git a/tests/PhpWord/Collection/CollectionTest.php b/tests/PhpWordTests/Collection/CollectionTest.php similarity index 94% rename from tests/PhpWord/Collection/CollectionTest.php rename to tests/PhpWordTests/Collection/CollectionTest.php index 97b59c55..4095c403 100644 --- a/tests/PhpWord/Collection/CollectionTest.php +++ b/tests/PhpWordTests/Collection/CollectionTest.php @@ -15,9 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Collection; +namespace PhpOffice\PhpWordTests\Collection; use PhpOffice\PhpWord\Element\Footnote; +use PhpOffice\PhpWord\Collection\Footnotes; /** * Test class for PhpOffice\PhpWord\Collection subnamespace. diff --git a/tests/PhpWord/ComplexType/FootnotePropertiesTest.php b/tests/PhpWordTests/ComplexType/FootnotePropertiesTest.php similarity index 96% rename from tests/PhpWord/ComplexType/FootnotePropertiesTest.php rename to tests/PhpWordTests/ComplexType/FootnotePropertiesTest.php index ddf33c63..1c365459 100644 --- a/tests/PhpWord/ComplexType/FootnotePropertiesTest.php +++ b/tests/PhpWordTests/ComplexType/FootnotePropertiesTest.php @@ -15,9 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\ComplexType; +namespace PhpOffice\PhpWordTests\ComplexType; use InvalidArgumentException; +use PhpOffice\PhpWord\ComplexType\FootnoteProperties; use PhpOffice\PhpWord\SimpleType\NumberFormat; /** diff --git a/tests/PhpWord/ComplexType/ProofStateTest.php b/tests/PhpWordTests/ComplexType/ProofStateTest.php similarity index 95% rename from tests/PhpWord/ComplexType/ProofStateTest.php rename to tests/PhpWordTests/ComplexType/ProofStateTest.php index df4671e4..360a47fd 100644 --- a/tests/PhpWord/ComplexType/ProofStateTest.php +++ b/tests/PhpWordTests/ComplexType/ProofStateTest.php @@ -15,9 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\ComplexType; +namespace PhpOffice\PhpWordTests\ComplexType; use InvalidArgumentException; +use PhpOffice\PhpWord\ComplexType\ProofState; /** * Test class for PhpOffice\PhpWord\ComplexType\ProofState. diff --git a/tests/PhpWord/Element/AbstractElementTest.php b/tests/PhpWordTests/Element/AbstractElementTest.php similarity index 97% rename from tests/PhpWord/Element/AbstractElementTest.php rename to tests/PhpWordTests/Element/AbstractElementTest.php index 0243efd3..8a0a878e 100644 --- a/tests/PhpWord/Element/AbstractElementTest.php +++ b/tests/PhpWordTests/Element/AbstractElementTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; /** * Test class for PhpOffice\PhpWord\Element\AbstractElement. diff --git a/tests/PhpWord/Element/BookmarkTest.php b/tests/PhpWordTests/Element/BookmarkTest.php similarity index 93% rename from tests/PhpWord/Element/BookmarkTest.php rename to tests/PhpWordTests/Element/BookmarkTest.php index 9beb1077..efd89566 100644 --- a/tests/PhpWord/Element/BookmarkTest.php +++ b/tests/PhpWordTests/Element/BookmarkTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; + +use PhpOffice\PhpWord\Element\Bookmark; /** * Test class for PhpOffice\PhpWord\Element\Footer. diff --git a/tests/PhpWord/Element/CellTest.php b/tests/PhpWordTests/Element/CellTest.php similarity index 98% rename from tests/PhpWord/Element/CellTest.php rename to tests/PhpWordTests/Element/CellTest.php index bd118298..a6affafe 100644 --- a/tests/PhpWord/Element/CellTest.php +++ b/tests/PhpWordTests/Element/CellTest.php @@ -15,10 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; use BadMethodCallException; -use PhpOffice\PhpWord\AbstractWebServerEmbeddedTest; +use PhpOffice\PhpWord\Element\Cell; +use PhpOffice\PhpWordTests\AbstractWebServerEmbeddedTest; /** * Test class for PhpOffice\PhpWord\Element\Cell. diff --git a/tests/PhpWord/Element/CheckBoxTest.php b/tests/PhpWordTests/Element/CheckBoxTest.php similarity index 97% rename from tests/PhpWord/Element/CheckBoxTest.php rename to tests/PhpWordTests/Element/CheckBoxTest.php index 5e944163..f7b780f0 100644 --- a/tests/PhpWord/Element/CheckBoxTest.php +++ b/tests/PhpWordTests/Element/CheckBoxTest.php @@ -15,8 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; +use PhpOffice\PhpWord\Element\CheckBox; use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Style\Font; diff --git a/tests/PhpWord/Element/CommentTest.php b/tests/PhpWordTests/Element/CommentTest.php similarity index 96% rename from tests/PhpWord/Element/CommentTest.php rename to tests/PhpWordTests/Element/CommentTest.php index 07bd0521..fe346307 100644 --- a/tests/PhpWord/Element/CommentTest.php +++ b/tests/PhpWordTests/Element/CommentTest.php @@ -15,10 +15,12 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; use DateTime; use InvalidArgumentException; +use PhpOffice\PhpWord\Element\Comment; +use PhpOffice\PhpWord\Element\Text; /** * Test class for PhpOffice\PhpWord\Element\Header. diff --git a/tests/PhpWord/Element/FieldTest.php b/tests/PhpWordTests/Element/FieldTest.php similarity index 97% rename from tests/PhpWord/Element/FieldTest.php rename to tests/PhpWordTests/Element/FieldTest.php index 1b73d99c..06f7c684 100644 --- a/tests/PhpWord/Element/FieldTest.php +++ b/tests/PhpWordTests/Element/FieldTest.php @@ -15,9 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; use InvalidArgumentException; +use PhpOffice\PhpWord\Element\Field; +use PhpOffice\PhpWord\Element\TextRun; /** * Test class for PhpOffice\PhpWord\Element\Field. diff --git a/tests/PhpWord/Element/FooterTest.php b/tests/PhpWordTests/Element/FooterTest.php similarity index 97% rename from tests/PhpWord/Element/FooterTest.php rename to tests/PhpWordTests/Element/FooterTest.php index 2897030a..672f3db7 100644 --- a/tests/PhpWord/Element/FooterTest.php +++ b/tests/PhpWordTests/Element/FooterTest.php @@ -15,9 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; -use PhpOffice\PhpWord\AbstractWebServerEmbeddedTest; +use PhpOffice\PhpWord\Element\Footer; +use PhpOffice\PhpWordTests\AbstractWebServerEmbeddedTest; /** * Test class for PhpOffice\PhpWord\Element\Footer. diff --git a/tests/PhpWord/Element/FootnoteTest.php b/tests/PhpWordTests/Element/FootnoteTest.php similarity index 97% rename from tests/PhpWord/Element/FootnoteTest.php rename to tests/PhpWordTests/Element/FootnoteTest.php index 29ceb47e..a82bc1ec 100644 --- a/tests/PhpWord/Element/FootnoteTest.php +++ b/tests/PhpWordTests/Element/FootnoteTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; + +use PhpOffice\PhpWord\Element\Footnote; /** * Test class for PhpOffice\PhpWord\Element\Footnote. diff --git a/tests/PhpWord/Element/HeaderTest.php b/tests/PhpWordTests/Element/HeaderTest.php similarity index 97% rename from tests/PhpWord/Element/HeaderTest.php rename to tests/PhpWordTests/Element/HeaderTest.php index 90aaf308..74e7c126 100644 --- a/tests/PhpWord/Element/HeaderTest.php +++ b/tests/PhpWordTests/Element/HeaderTest.php @@ -15,10 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; use BadMethodCallException; -use PhpOffice\PhpWord\AbstractWebServerEmbeddedTest; +use PhpOffice\PhpWord\Element\Header; +use PhpOffice\PhpWordTests\AbstractWebServerEmbeddedTest; /** * Test class for PhpOffice\PhpWord\Element\Header. diff --git a/tests/PhpWord/Element/ImageTest.php b/tests/PhpWordTests/Element/ImageTest.php similarity index 98% rename from tests/PhpWord/Element/ImageTest.php rename to tests/PhpWordTests/Element/ImageTest.php index cbc712fd..722f0859 100644 --- a/tests/PhpWord/Element/ImageTest.php +++ b/tests/PhpWordTests/Element/ImageTest.php @@ -15,9 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; -use PhpOffice\PhpWord\AbstractWebServerEmbeddedTest; +use PhpOffice\PhpWord\Element\Image; +use PhpOffice\PhpWordTests\AbstractWebServerEmbeddedTest; use PhpOffice\PhpWord\SimpleType\Jc; /** diff --git a/tests/PhpWord/Element/LineTest.php b/tests/PhpWordTests/Element/LineTest.php similarity index 96% rename from tests/PhpWord/Element/LineTest.php rename to tests/PhpWordTests/Element/LineTest.php index 61f8691f..101c7309 100644 --- a/tests/PhpWord/Element/LineTest.php +++ b/tests/PhpWordTests/Element/LineTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; + +use PhpOffice\PhpWord\Element\Line; /** * Test class for PhpOffice\PhpWord\Element\Line. diff --git a/tests/PhpWord/Element/LinkTest.php b/tests/PhpWordTests/Element/LinkTest.php similarity index 97% rename from tests/PhpWord/Element/LinkTest.php rename to tests/PhpWordTests/Element/LinkTest.php index fd9c83fc..fd6bfc70 100644 --- a/tests/PhpWord/Element/LinkTest.php +++ b/tests/PhpWordTests/Element/LinkTest.php @@ -15,8 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; +use PhpOffice\PhpWord\Element\Link; use PhpOffice\PhpWord\Style\Font; /** diff --git a/tests/PhpWord/Element/ListItemRunTest.php b/tests/PhpWordTests/Element/ListItemRunTest.php similarity index 98% rename from tests/PhpWord/Element/ListItemRunTest.php rename to tests/PhpWordTests/Element/ListItemRunTest.php index 9ed01b82..e438d186 100644 --- a/tests/PhpWord/Element/ListItemRunTest.php +++ b/tests/PhpWordTests/Element/ListItemRunTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; + +use PhpOffice\PhpWord\Element\ListItemRun; /** * Test class for PhpOffice\PhpWord\Element\ListItemRun. diff --git a/tests/PhpWord/Element/ListItemTest.php b/tests/PhpWordTests/Element/ListItemTest.php similarity index 95% rename from tests/PhpWord/Element/ListItemTest.php rename to tests/PhpWordTests/Element/ListItemTest.php index 5a86b28f..704f4fef 100644 --- a/tests/PhpWord/Element/ListItemTest.php +++ b/tests/PhpWordTests/Element/ListItemTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; + +use PhpOffice\PhpWord\Element\ListItem; /** * Test class for PhpOffice\PhpWord\Element\ListItem. diff --git a/tests/PhpWord/Element/ObjectTest.php b/tests/PhpWordTests/Element/ObjectTest.php similarity index 97% rename from tests/PhpWord/Element/ObjectTest.php rename to tests/PhpWordTests/Element/ObjectTest.php index 1f9c9665..21bb2cef 100644 --- a/tests/PhpWord/Element/ObjectTest.php +++ b/tests/PhpWordTests/Element/ObjectTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; + +use PhpOffice\PhpWord\Element\OLEObject; /** * Test class for PhpOffice\PhpWord\Element\OLEObject. diff --git a/tests/PhpWord/Element/PageBreakTest.php b/tests/PhpWordTests/Element/PageBreakTest.php similarity index 92% rename from tests/PhpWord/Element/PageBreakTest.php rename to tests/PhpWordTests/Element/PageBreakTest.php index 929f1518..c4789b27 100644 --- a/tests/PhpWord/Element/PageBreakTest.php +++ b/tests/PhpWordTests/Element/PageBreakTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; + +use PhpOffice\PhpWord\Element\PageBreak; /** * Test class for PhpOffice\PhpWord\Element\PageBreak. diff --git a/tests/PhpWord/Element/PreserveTextTest.php b/tests/PhpWordTests/Element/PreserveTextTest.php similarity index 96% rename from tests/PhpWord/Element/PreserveTextTest.php rename to tests/PhpWordTests/Element/PreserveTextTest.php index 440b9ec9..de510bdf 100644 --- a/tests/PhpWord/Element/PreserveTextTest.php +++ b/tests/PhpWordTests/Element/PreserveTextTest.php @@ -15,8 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; +use PhpOffice\PhpWord\Element\PreserveText; use PhpOffice\PhpWord\SimpleType\Jc; /** diff --git a/tests/PhpWord/Element/RowTest.php b/tests/PhpWordTests/Element/RowTest.php similarity index 96% rename from tests/PhpWord/Element/RowTest.php rename to tests/PhpWordTests/Element/RowTest.php index 5de6f3cc..28c6681b 100644 --- a/tests/PhpWord/Element/RowTest.php +++ b/tests/PhpWordTests/Element/RowTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; + +use PhpOffice\PhpWord\Element\Row; /** * Test class for PhpOffice\PhpWord\Element\Row. diff --git a/tests/PhpWord/Element/SDTTest.php b/tests/PhpWordTests/Element/SDTTest.php similarity index 96% rename from tests/PhpWord/Element/SDTTest.php rename to tests/PhpWordTests/Element/SDTTest.php index 08adecc1..b33dde14 100644 --- a/tests/PhpWord/Element/SDTTest.php +++ b/tests/PhpWordTests/Element/SDTTest.php @@ -15,9 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; use InvalidArgumentException; +use PhpOffice\PhpWord\Element\SDT; /** * Test class for PhpOffice\PhpWord\Element\SDT. diff --git a/tests/PhpWord/Element/SectionTest.php b/tests/PhpWordTests/Element/SectionTest.php similarity index 98% rename from tests/PhpWord/Element/SectionTest.php rename to tests/PhpWordTests/Element/SectionTest.php index 80d214ea..e3654db2 100644 --- a/tests/PhpWord/Element/SectionTest.php +++ b/tests/PhpWordTests/Element/SectionTest.php @@ -15,11 +15,13 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; use Exception; +use PhpOffice\PhpWord\Element\Header; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Style; +use PhpOffice\PhpWord\Element\Section; use PhpOffice\PhpWord\Style\Section as SectionStyle; /** diff --git a/tests/PhpWord/Element/TOCTest.php b/tests/PhpWordTests/Element/TOCTest.php similarity index 96% rename from tests/PhpWord/Element/TOCTest.php rename to tests/PhpWordTests/Element/TOCTest.php index 5f6e178a..ad2f61f7 100644 --- a/tests/PhpWord/Element/TOCTest.php +++ b/tests/PhpWordTests/Element/TOCTest.php @@ -15,8 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; +use PhpOffice\PhpWord\Element\Title; +use PhpOffice\PhpWord\Element\TOC; use PhpOffice\PhpWord\PhpWord; /** diff --git a/tests/PhpWord/Element/TableTest.php b/tests/PhpWordTests/Element/TableTest.php similarity index 97% rename from tests/PhpWord/Element/TableTest.php rename to tests/PhpWordTests/Element/TableTest.php index 671d99f9..6ce0739b 100644 --- a/tests/PhpWord/Element/TableTest.php +++ b/tests/PhpWordTests/Element/TableTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; + +use PhpOffice\PhpWord\Element\Table; /** * Test class for PhpOffice\PhpWord\Element\Table. diff --git a/tests/PhpWord/Element/TextBoxTest.php b/tests/PhpWordTests/Element/TextBoxTest.php similarity index 96% rename from tests/PhpWord/Element/TextBoxTest.php rename to tests/PhpWordTests/Element/TextBoxTest.php index d29333cc..30d684ac 100644 --- a/tests/PhpWord/Element/TextBoxTest.php +++ b/tests/PhpWordTests/Element/TextBoxTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; + +use PhpOffice\PhpWord\Element\TextBox; /** * Test class for PhpOffice\PhpWord\Element\TextBox. diff --git a/tests/PhpWord/Element/TextBreakTest.php b/tests/PhpWordTests/Element/TextBreakTest.php similarity index 96% rename from tests/PhpWord/Element/TextBreakTest.php rename to tests/PhpWordTests/Element/TextBreakTest.php index 253bebc6..5cdea5ad 100644 --- a/tests/PhpWord/Element/TextBreakTest.php +++ b/tests/PhpWordTests/Element/TextBreakTest.php @@ -15,8 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; +use PhpOffice\PhpWord\Element\TextBreak; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Style\Paragraph; diff --git a/tests/PhpWord/Element/TextRunTest.php b/tests/PhpWordTests/Element/TextRunTest.php similarity index 98% rename from tests/PhpWord/Element/TextRunTest.php rename to tests/PhpWordTests/Element/TextRunTest.php index 0d730a50..2a1ad6ef 100644 --- a/tests/PhpWord/Element/TextRunTest.php +++ b/tests/PhpWordTests/Element/TextRunTest.php @@ -15,8 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; +use PhpOffice\PhpWord\Element\TextRun; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Style\Paragraph; diff --git a/tests/PhpWord/Element/TextTest.php b/tests/PhpWordTests/Element/TextTest.php similarity index 96% rename from tests/PhpWord/Element/TextTest.php rename to tests/PhpWordTests/Element/TextTest.php index 1ed17881..f2e2066e 100644 --- a/tests/PhpWord/Element/TextTest.php +++ b/tests/PhpWordTests/Element/TextTest.php @@ -15,8 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; +use PhpOffice\PhpWord\Element\Text; use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Style\Font; diff --git a/tests/PhpWord/Element/TitleTest.php b/tests/PhpWordTests/Element/TitleTest.php similarity index 92% rename from tests/PhpWord/Element/TitleTest.php rename to tests/PhpWordTests/Element/TitleTest.php index 121fcd18..0e3e4815 100644 --- a/tests/PhpWord/Element/TitleTest.php +++ b/tests/PhpWordTests/Element/TitleTest.php @@ -15,9 +15,12 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; use InvalidArgumentException; +use PhpOffice\PhpWord\Element\PageBreak; +use PhpOffice\PhpWord\Element\TextRun; +use PhpOffice\PhpWord\Element\Title; /** * Test class for PhpOffice\PhpWord\Element\Title. diff --git a/tests/PhpWord/Element/TrackChangeTest.php b/tests/PhpWordTests/Element/TrackChangeTest.php similarity index 94% rename from tests/PhpWord/Element/TrackChangeTest.php rename to tests/PhpWordTests/Element/TrackChangeTest.php index 01a3ba44..de5585b5 100644 --- a/tests/PhpWord/Element/TrackChangeTest.php +++ b/tests/PhpWordTests/Element/TrackChangeTest.php @@ -15,9 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWordTests\Element; use DateTime; +use PhpOffice\PhpWord\Element\Text; +use PhpOffice\PhpWord\Element\TrackChange; /** * Test class for PhpOffice\PhpWord\Element\TrackChange. diff --git a/tests/PhpWord/Escaper/RtfEscaper2Test.php b/tests/PhpWordTests/Escaper/RtfEscaper2Test.php similarity index 98% rename from tests/PhpWord/Escaper/RtfEscaper2Test.php rename to tests/PhpWordTests/Escaper/RtfEscaper2Test.php index 5acc635d..e3036418 100644 --- a/tests/PhpWord/Escaper/RtfEscaper2Test.php +++ b/tests/PhpWordTests/Escaper/RtfEscaper2Test.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Escaper; +namespace PhpOffice\PhpWordTests\Escaper; /** * Test class for PhpOffice\PhpWord\Escaper\RTF. diff --git a/tests/PhpWord/Exception/CopyFileExceptionTest.php b/tests/PhpWordTests/Exception/CopyFileExceptionTest.php similarity index 92% rename from tests/PhpWord/Exception/CopyFileExceptionTest.php rename to tests/PhpWordTests/Exception/CopyFileExceptionTest.php index 9770ef6a..a4574b6b 100644 --- a/tests/PhpWord/Exception/CopyFileExceptionTest.php +++ b/tests/PhpWordTests/Exception/CopyFileExceptionTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Exception; +namespace PhpOffice\PhpWordTests\Exception; + +use PhpOffice\PhpWord\Exception\CopyFileException; /** * @covers \PhpOffice\PhpWord\Exception\CopyFileException diff --git a/tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php b/tests/PhpWordTests/Exception/CreateTemporaryFileExceptionTest.php similarity index 91% rename from tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php rename to tests/PhpWordTests/Exception/CreateTemporaryFileExceptionTest.php index 63cd1642..834a1c09 100644 --- a/tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php +++ b/tests/PhpWordTests/Exception/CreateTemporaryFileExceptionTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Exception; +namespace PhpOffice\PhpWordTests\Exception; + +use PhpOffice\PhpWord\Exception\CreateTemporaryFileException; /** * @covers \PhpOffice\PhpWord\Exception\CreateTemporaryFileException diff --git a/tests/PhpWord/Exception/ExceptionTest.php b/tests/PhpWordTests/Exception/ExceptionTest.php similarity index 79% rename from tests/PhpWord/Exception/ExceptionTest.php rename to tests/PhpWordTests/Exception/ExceptionTest.php index 1e8fcdde..a2877511 100644 --- a/tests/PhpWord/Exception/ExceptionTest.php +++ b/tests/PhpWordTests/Exception/ExceptionTest.php @@ -15,16 +15,19 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Exception; +namespace PhpOffice\PhpWordTests\Exception; + +use PhpOffice\PhpWord\Exception\Exception; +use PHPUnit\Framework\TestCase; /** * Test class for PhpOffice\PhpWord\Exception\Exception. * - * @coversDefaultClass \PhpOffice\PhpWord\Exception\Exception + * @coversDefaultClass Exception * * @runTestsInSeparateProcesses */ -class ExceptionTest extends \PHPUnit\Framework\TestCase +class ExceptionTest extends TestCase { /** * Throw new exception. @@ -33,7 +36,7 @@ class ExceptionTest extends \PHPUnit\Framework\TestCase */ public function testThrowException(): void { - $this->expectException(\PhpOffice\PhpWord\Exception\Exception::class); + $this->expectException(Exception::class); throw new Exception(); } diff --git a/tests/PhpWord/Exception/InvalidImageExceptionTest.php b/tests/PhpWordTests/Exception/InvalidImageExceptionTest.php similarity index 92% rename from tests/PhpWord/Exception/InvalidImageExceptionTest.php rename to tests/PhpWordTests/Exception/InvalidImageExceptionTest.php index 61f3c34e..d3cb5757 100644 --- a/tests/PhpWord/Exception/InvalidImageExceptionTest.php +++ b/tests/PhpWordTests/Exception/InvalidImageExceptionTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Exception; +namespace PhpOffice\PhpWordTests\Exception; + +use PhpOffice\PhpWord\Exception\InvalidImageException; /** * Test class for PhpOffice\PhpWord\Exception\InvalidImageException. diff --git a/tests/PhpWord/Exception/InvalidStyleExceptionTest.php b/tests/PhpWordTests/Exception/InvalidStyleExceptionTest.php similarity index 92% rename from tests/PhpWord/Exception/InvalidStyleExceptionTest.php rename to tests/PhpWordTests/Exception/InvalidStyleExceptionTest.php index b413cfe5..d1da3b2a 100644 --- a/tests/PhpWord/Exception/InvalidStyleExceptionTest.php +++ b/tests/PhpWordTests/Exception/InvalidStyleExceptionTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Exception; +namespace PhpOffice\PhpWordTests\Exception; + +use PhpOffice\PhpWord\Exception\InvalidStyleException; /** * Test class for PhpOffice\PhpWord\Exception\InvalidStyleException. diff --git a/tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php b/tests/PhpWordTests/Exception/UnsupportedImageTypeExceptionTest.php similarity index 90% rename from tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php rename to tests/PhpWordTests/Exception/UnsupportedImageTypeExceptionTest.php index dff4d459..e978b972 100644 --- a/tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php +++ b/tests/PhpWordTests/Exception/UnsupportedImageTypeExceptionTest.php @@ -15,13 +15,13 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Exception; +namespace PhpOffice\PhpWordTests\Exception; + +use PhpOffice\PhpWord\Exception\UnsupportedImageTypeException; /** * Test class for PhpOffice\PhpWord\Exception\UnsupportedImageTypeExceptionTest. * - * @coversDefaultClass \PhpOffice\PhpWord\Exception\UnsupportedImageTypeExceptionTest - * * @runTestsInSeparateProcesses */ class UnsupportedImageTypeExceptionTest extends \PHPUnit\Framework\TestCase diff --git a/tests/PhpWord/IOFactoryTest.php b/tests/PhpWordTests/IOFactoryTest.php similarity index 95% rename from tests/PhpWord/IOFactoryTest.php rename to tests/PhpWordTests/IOFactoryTest.php index 3e673885..f4c1c867 100644 --- a/tests/PhpWord/IOFactoryTest.php +++ b/tests/PhpWordTests/IOFactoryTest.php @@ -15,7 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord; +namespace PhpOffice\PhpWordTests; + +use PhpOffice\PhpWord\IOFactory; +use PhpOffice\PhpWord\PhpWord; /** * Test class for PhpOffice\PhpWord\IOFactory. diff --git a/tests/PhpWord/MediaTest.php b/tests/PhpWordTests/MediaTest.php similarity index 98% rename from tests/PhpWord/MediaTest.php rename to tests/PhpWordTests/MediaTest.php index 3d058ba8..fe17680c 100644 --- a/tests/PhpWord/MediaTest.php +++ b/tests/PhpWordTests/MediaTest.php @@ -15,10 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord; +namespace PhpOffice\PhpWordTests; use Exception; use PhpOffice\PhpWord\Element\Image; +use PhpOffice\PhpWord\Media; /** * Test class for PhpOffice\PhpWord\Media. diff --git a/tests/PhpWord/Metadata/DocInfoTest.php b/tests/PhpWordTests/Metadata/DocInfoTest.php similarity index 98% rename from tests/PhpWord/Metadata/DocInfoTest.php rename to tests/PhpWordTests/Metadata/DocInfoTest.php index 13abf877..a4d34f3e 100644 --- a/tests/PhpWord/Metadata/DocInfoTest.php +++ b/tests/PhpWordTests/Metadata/DocInfoTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Metadata; +namespace PhpOffice\PhpWordTests\Metadata; + +use PhpOffice\PhpWord\Metadata\DocInfo; /** * Test class for PhpOffice\PhpWord\Metadata\DocInfo. diff --git a/tests/PhpWord/Metadata/SettingsTest.php b/tests/PhpWordTests/Metadata/SettingsTest.php similarity index 98% rename from tests/PhpWord/Metadata/SettingsTest.php rename to tests/PhpWordTests/Metadata/SettingsTest.php index 56aaf74b..48af68ea 100644 --- a/tests/PhpWord/Metadata/SettingsTest.php +++ b/tests/PhpWordTests/Metadata/SettingsTest.php @@ -15,10 +15,12 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Metadata; +namespace PhpOffice\PhpWordTests\Metadata; use InvalidArgumentException; use PhpOffice\PhpWord\ComplexType\ProofState; +use PhpOffice\PhpWord\Metadata\Protection; +use PhpOffice\PhpWord\Metadata\Settings; use PhpOffice\PhpWord\SimpleType\Zoom; /** diff --git a/tests/PhpWord/PhpWordTest.php b/tests/PhpWordTests/PhpWordTest.php similarity index 98% rename from tests/PhpWord/PhpWordTest.php rename to tests/PhpWordTests/PhpWordTest.php index 33333b64..60b8c4bd 100644 --- a/tests/PhpWord/PhpWordTest.php +++ b/tests/PhpWordTests/PhpWordTest.php @@ -15,10 +15,13 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord; +namespace PhpOffice\PhpWordTests; use BadMethodCallException; use PhpOffice\PhpWord\Metadata\DocInfo; +use PhpOffice\PhpWord\PhpWord; +use PhpOffice\PhpWord\Settings; +use PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\PhpWord. diff --git a/tests/PhpWord/Reader/HTMLTest.php b/tests/PhpWordTests/Reader/HTMLTest.php similarity index 97% rename from tests/PhpWord/Reader/HTMLTest.php rename to tests/PhpWordTests/Reader/HTMLTest.php index 127b0cd8..f091e5a2 100644 --- a/tests/PhpWord/Reader/HTMLTest.php +++ b/tests/PhpWordTests/Reader/HTMLTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Reader; +namespace PhpOffice\PhpWordTests\Reader; use Exception; use PhpOffice\PhpWord\IOFactory; diff --git a/tests/PhpWord/Reader/MsDocTest.php b/tests/PhpWordTests/Reader/MsDocTest.php similarity index 96% rename from tests/PhpWord/Reader/MsDocTest.php rename to tests/PhpWordTests/Reader/MsDocTest.php index f0282b76..deb8b9ba 100644 --- a/tests/PhpWord/Reader/MsDocTest.php +++ b/tests/PhpWordTests/Reader/MsDocTest.php @@ -15,10 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Reader; +namespace PhpOffice\PhpWordTests\Reader; use Exception; use PhpOffice\PhpWord\IOFactory; +use PhpOffice\PhpWord\Reader\MsDoc; /** * Test class for PhpOffice\PhpWord\Reader\MsDoc. diff --git a/tests/PhpWord/Reader/ODTextTest.php b/tests/PhpWordTests/Reader/ODTextTest.php similarity index 96% rename from tests/PhpWord/Reader/ODTextTest.php rename to tests/PhpWordTests/Reader/ODTextTest.php index bd480c85..e4baf8d4 100644 --- a/tests/PhpWord/Reader/ODTextTest.php +++ b/tests/PhpWordTests/Reader/ODTextTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Reader; +namespace PhpOffice\PhpWordTests\Reader; use PhpOffice\PhpWord\IOFactory; diff --git a/tests/PhpWord/Reader/RTFTest.php b/tests/PhpWordTests/Reader/RTFTest.php similarity index 97% rename from tests/PhpWord/Reader/RTFTest.php rename to tests/PhpWordTests/Reader/RTFTest.php index c4382250..a1054ab2 100644 --- a/tests/PhpWord/Reader/RTFTest.php +++ b/tests/PhpWordTests/Reader/RTFTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Reader; +namespace PhpOffice\PhpWordTests\Reader; use Exception; use PhpOffice\PhpWord\IOFactory; diff --git a/tests/PhpWord/Reader/Word2007/ElementTest.php b/tests/PhpWordTests/Reader/Word2007/ElementTest.php similarity index 99% rename from tests/PhpWord/Reader/Word2007/ElementTest.php rename to tests/PhpWordTests/Reader/Word2007/ElementTest.php index 31044b62..3bdd0387 100644 --- a/tests/PhpWord/Reader/Word2007/ElementTest.php +++ b/tests/PhpWordTests/Reader/Word2007/ElementTest.php @@ -15,9 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Reader\Word2007; +namespace PhpOffice\PhpWordTests\Reader\Word2007; -use PhpOffice\PhpWord\AbstractTestReader; +use PhpOffice\PhpWordTests\AbstractTestReader; use PhpOffice\PhpWord\Element\TrackChange; /** diff --git a/tests/PhpWord/Reader/Word2007/PartTest.php b/tests/PhpWordTests/Reader/Word2007/PartTest.php similarity index 98% rename from tests/PhpWord/Reader/Word2007/PartTest.php rename to tests/PhpWordTests/Reader/Word2007/PartTest.php index e904fb6e..46089e8f 100644 --- a/tests/PhpWord/Reader/Word2007/PartTest.php +++ b/tests/PhpWordTests/Reader/Word2007/PartTest.php @@ -15,9 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Reader\Word2007; +namespace PhpOffice\PhpWordTests\Reader\Word2007; -use PhpOffice\PhpWord\AbstractTestReader; +use PhpOffice\PhpWordTests\AbstractTestReader; /** * Test class for PhpOffice\PhpWord\Reader\Word2007 subnamespace. diff --git a/tests/PhpWord/Reader/Word2007/StyleTest.php b/tests/PhpWordTests/Reader/Word2007/StyleTest.php similarity index 98% rename from tests/PhpWord/Reader/Word2007/StyleTest.php rename to tests/PhpWordTests/Reader/Word2007/StyleTest.php index 9000bb07..956fc471 100644 --- a/tests/PhpWord/Reader/Word2007/StyleTest.php +++ b/tests/PhpWordTests/Reader/Word2007/StyleTest.php @@ -15,9 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Reader\Word2007; +namespace PhpOffice\PhpWordTests\Reader\Word2007; -use PhpOffice\PhpWord\AbstractTestReader; +use PhpOffice\PhpWordTests\AbstractTestReader; use PhpOffice\PhpWord\SimpleType\TblWidth; use PhpOffice\PhpWord\SimpleType\VerticalJc; use PhpOffice\PhpWord\Style; diff --git a/tests/PhpWord/Reader/Word2007Test.php b/tests/PhpWordTests/Reader/Word2007Test.php similarity index 95% rename from tests/PhpWord/Reader/Word2007Test.php rename to tests/PhpWordTests/Reader/Word2007Test.php index e008c3bc..999eaf85 100644 --- a/tests/PhpWord/Reader/Word2007Test.php +++ b/tests/PhpWordTests/Reader/Word2007Test.php @@ -15,10 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Reader; +namespace PhpOffice\PhpWordTests\Reader; use PhpOffice\PhpWord\IOFactory; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWord\Reader\Word2007; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Reader\Word2007. diff --git a/tests/PhpWord/SettingsTest.php b/tests/PhpWordTests/SettingsTest.php similarity index 98% rename from tests/PhpWord/SettingsTest.php rename to tests/PhpWordTests/SettingsTest.php index 8466e2dc..bf4dd4bf 100644 --- a/tests/PhpWord/SettingsTest.php +++ b/tests/PhpWordTests/SettingsTest.php @@ -15,7 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord; +namespace PhpOffice\PhpWordTests; + +use PhpOffice\PhpWord\PhpWord; +use PhpOffice\PhpWord\Settings; /** * Test class for PhpOffice\PhpWord\Settings. diff --git a/tests/PhpWord/Shared/ConverterTest.php b/tests/PhpWordTests/Shared/ConverterTest.php similarity index 98% rename from tests/PhpWord/Shared/ConverterTest.php rename to tests/PhpWordTests/Shared/ConverterTest.php index 7c1fe201..95981210 100644 --- a/tests/PhpWord/Shared/ConverterTest.php +++ b/tests/PhpWordTests/Shared/ConverterTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Shared; +namespace PhpOffice\PhpWordTests\Shared; + +use PhpOffice\PhpWord\Shared\Converter; /** * Test class for PhpOffice\PhpWord\Shared\Converter. diff --git a/tests/PhpWord/Shared/DrawingTest.php b/tests/PhpWordTests/Shared/DrawingTest.php similarity index 98% rename from tests/PhpWord/Shared/DrawingTest.php rename to tests/PhpWordTests/Shared/DrawingTest.php index 765215bd..6e2cb707 100644 --- a/tests/PhpWord/Shared/DrawingTest.php +++ b/tests/PhpWordTests/Shared/DrawingTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Shared; +namespace PhpOffice\PhpWordTests\Shared; + +use PhpOffice\PhpWord\Shared\Drawing; /** * Test class for PhpOffice\PhpWord\Shared\Drawing. diff --git a/tests/PhpWord/Shared/HtmlTest.php b/tests/PhpWordTests/Shared/HtmlTest.php similarity index 99% rename from tests/PhpWord/Shared/HtmlTest.php rename to tests/PhpWordTests/Shared/HtmlTest.php index 5dd693c5..f434dbd3 100644 --- a/tests/PhpWord/Shared/HtmlTest.php +++ b/tests/PhpWordTests/Shared/HtmlTest.php @@ -15,15 +15,16 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Shared; +namespace PhpOffice\PhpWordTests\Shared; use Exception; -use PhpOffice\PhpWord\AbstractWebServerEmbeddedTest; +use PhpOffice\PhpWord\Shared\Html; +use PhpOffice\PhpWordTests\AbstractWebServerEmbeddedTest; use PhpOffice\PhpWord\Element\Section; use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\SimpleType\LineSpacingRule; use PhpOffice\PhpWord\Style\Paragraph; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Shared\Html. diff --git a/tests/PhpWord/Shared/Microsoft/PasswordEncoderTest.php b/tests/PhpWordTests/Shared/Microsoft/PasswordEncoderTest.php similarity index 96% rename from tests/PhpWord/Shared/Microsoft/PasswordEncoderTest.php rename to tests/PhpWordTests/Shared/Microsoft/PasswordEncoderTest.php index 3f2f4e4f..9389c974 100644 --- a/tests/PhpWord/Shared/Microsoft/PasswordEncoderTest.php +++ b/tests/PhpWordTests/Shared/Microsoft/PasswordEncoderTest.php @@ -15,12 +15,12 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Shared\Microsoft; +namespace PhpOffice\PhpWordTests\Shared\Microsoft; + +use PhpOffice\PhpWord\Shared\Microsoft\PasswordEncoder; /** * Test class for \PhpOffice\PhpWord\Shared\Microsoft. - * - * @coversDefaultClass \PhpOffice\PhpWord\Shared\Microsoft */ class PasswordEncoderTest extends \PHPUnit\Framework\TestCase { diff --git a/tests/PhpWord/Shared/TextTest.php b/tests/PhpWordTests/Shared/TextTest.php similarity index 97% rename from tests/PhpWord/Shared/TextTest.php rename to tests/PhpWordTests/Shared/TextTest.php index c383abf2..fdd9e9df 100644 --- a/tests/PhpWord/Shared/TextTest.php +++ b/tests/PhpWordTests/Shared/TextTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Shared; +namespace PhpOffice\PhpWordTests\Shared; + +use PhpOffice\PhpWord\Shared\Text; /** * Test class for Text. diff --git a/tests/PhpWord/Shared/XMLReaderTest.php b/tests/PhpWordTests/Shared/XMLReaderTest.php similarity index 98% rename from tests/PhpWord/Shared/XMLReaderTest.php rename to tests/PhpWordTests/Shared/XMLReaderTest.php index 3088872d..43090cfb 100644 --- a/tests/PhpWord/Shared/XMLReaderTest.php +++ b/tests/PhpWordTests/Shared/XMLReaderTest.php @@ -15,10 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Shared; +namespace PhpOffice\PhpWordTests\Shared; use Exception; use InvalidArgumentException; +use PhpOffice\PhpWord\Shared\XMLReader; /** * Test class for XMLReader. diff --git a/tests/PhpWord/Shared/XMLWriterTest.php b/tests/PhpWordTests/Shared/XMLWriterTest.php similarity index 96% rename from tests/PhpWord/Shared/XMLWriterTest.php rename to tests/PhpWordTests/Shared/XMLWriterTest.php index b69ca00d..ccb07c1a 100644 --- a/tests/PhpWord/Shared/XMLWriterTest.php +++ b/tests/PhpWordTests/Shared/XMLWriterTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Shared; +namespace PhpOffice\PhpWordTests\Shared; + +use PhpOffice\PhpWord\Shared\XMLWriter; /** * Test class for XMLWriter. diff --git a/tests/PhpWord/Shared/ZipArchiveTest.php b/tests/PhpWordTests/Shared/ZipArchiveTest.php similarity index 98% rename from tests/PhpWord/Shared/ZipArchiveTest.php rename to tests/PhpWordTests/Shared/ZipArchiveTest.php index 57fdaebb..41da9ae5 100644 --- a/tests/PhpWord/Shared/ZipArchiveTest.php +++ b/tests/PhpWordTests/Shared/ZipArchiveTest.php @@ -15,9 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Shared; +namespace PhpOffice\PhpWordTests\Shared; use PhpOffice\PhpWord\Settings; +use PhpOffice\PhpWord\Shared\ZipArchive; /** * Test class for PhpOffice\PhpWord\Shared\ZipArchive. diff --git a/tests/PhpWord/Style/AbstractStyleTest.php b/tests/PhpWordTests/Style/AbstractStyleTest.php similarity index 98% rename from tests/PhpWord/Style/AbstractStyleTest.php rename to tests/PhpWordTests/Style/AbstractStyleTest.php index 1d492bf9..75926213 100644 --- a/tests/PhpWord/Style/AbstractStyleTest.php +++ b/tests/PhpWordTests/Style/AbstractStyleTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; use InvalidArgumentException; use ReflectionClass; diff --git a/tests/PhpWord/Style/CellTest.php b/tests/PhpWordTests/Style/CellTest.php similarity index 97% rename from tests/PhpWord/Style/CellTest.php rename to tests/PhpWordTests/Style/CellTest.php index 3e7a78a0..92b7919c 100644 --- a/tests/PhpWord/Style/CellTest.php +++ b/tests/PhpWordTests/Style/CellTest.php @@ -15,8 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; +use PhpOffice\PhpWord\Style\Cell; use PhpOffice\PhpWord\SimpleType\VerticalJc; /** diff --git a/tests/PhpWord/Style/ChartTest.php b/tests/PhpWordTests/Style/ChartTest.php similarity index 98% rename from tests/PhpWord/Style/ChartTest.php rename to tests/PhpWordTests/Style/ChartTest.php index 251ef465..c756362f 100644 --- a/tests/PhpWord/Style/ChartTest.php +++ b/tests/PhpWordTests/Style/ChartTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; + +use PhpOffice\PhpWord\Style\Chart; /** * Test class for PhpOffice\PhpWord\Style\Chart. diff --git a/tests/PhpWord/Style/FontTest.php b/tests/PhpWordTests/Style/FontTest.php similarity index 97% rename from tests/PhpWord/Style/FontTest.php rename to tests/PhpWordTests/Style/FontTest.php index a186aab4..557a3b28 100644 --- a/tests/PhpWord/Style/FontTest.php +++ b/tests/PhpWordTests/Style/FontTest.php @@ -15,11 +15,13 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWord\Style\Font; +use PhpOffice\PhpWord\Style\Language; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Style\Font. diff --git a/tests/PhpWord/Style/ImageTest.php b/tests/PhpWordTests/Style/ImageTest.php similarity index 97% rename from tests/PhpWord/Style/ImageTest.php rename to tests/PhpWordTests/Style/ImageTest.php index 1e1df083..49c73757 100644 --- a/tests/PhpWord/Style/ImageTest.php +++ b/tests/PhpWordTests/Style/ImageTest.php @@ -15,10 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; use InvalidArgumentException; use PhpOffice\PhpWord\SimpleType\Jc; +use PhpOffice\PhpWord\Style\Image; /** * Test class for PhpOffice\PhpWord\Style\Image. diff --git a/tests/PhpWord/Style/IndentationTest.php b/tests/PhpWordTests/Style/IndentationTest.php similarity index 94% rename from tests/PhpWord/Style/IndentationTest.php rename to tests/PhpWordTests/Style/IndentationTest.php index 2d359d0a..4de66447 100644 --- a/tests/PhpWord/Style/IndentationTest.php +++ b/tests/PhpWordTests/Style/IndentationTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; + +use PhpOffice\PhpWord\Style\Indentation; /** * Test class for PhpOffice\PhpWord\Style\Indentation. diff --git a/tests/PhpWord/Style/LanguageTest.php b/tests/PhpWordTests/Style/LanguageTest.php similarity index 96% rename from tests/PhpWord/Style/LanguageTest.php rename to tests/PhpWordTests/Style/LanguageTest.php index db294e71..a19546fd 100644 --- a/tests/PhpWord/Style/LanguageTest.php +++ b/tests/PhpWordTests/Style/LanguageTest.php @@ -15,9 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; use InvalidArgumentException; +use PhpOffice\PhpWord\Style\Language; use PHPUnit\Framework\Assert; /** diff --git a/tests/PhpWord/Style/LineNumberingTest.php b/tests/PhpWordTests/Style/LineNumberingTest.php similarity index 94% rename from tests/PhpWord/Style/LineNumberingTest.php rename to tests/PhpWordTests/Style/LineNumberingTest.php index 017a4a53..bef754bc 100644 --- a/tests/PhpWord/Style/LineNumberingTest.php +++ b/tests/PhpWordTests/Style/LineNumberingTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; + +use PhpOffice\PhpWord\Style\LineNumbering; /** * Test class for PhpOffice\PhpWord\Style\LineNumbering. diff --git a/tests/PhpWord/Style/LineTest.php b/tests/PhpWordTests/Style/LineTest.php similarity index 98% rename from tests/PhpWord/Style/LineTest.php rename to tests/PhpWordTests/Style/LineTest.php index e9a1a770..5ace8675 100644 --- a/tests/PhpWord/Style/LineTest.php +++ b/tests/PhpWordTests/Style/LineTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; + +use PhpOffice\PhpWord\Style\Line; /** * Test class for PhpOffice\PhpWord\Style\Image. diff --git a/tests/PhpWord/Style/ListItemTest.php b/tests/PhpWordTests/Style/ListItemTest.php similarity index 96% rename from tests/PhpWord/Style/ListItemTest.php rename to tests/PhpWordTests/Style/ListItemTest.php index 653a81b7..bc1ad670 100644 --- a/tests/PhpWord/Style/ListItemTest.php +++ b/tests/PhpWordTests/Style/ListItemTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; + +use PhpOffice\PhpWord\Style\ListItem; /** * Test class for PhpOffice\PhpWord\Style\ListItem. diff --git a/tests/PhpWord/Style/NumberingLevelTest.php b/tests/PhpWordTests/Style/NumberingLevelTest.php similarity index 95% rename from tests/PhpWord/Style/NumberingLevelTest.php rename to tests/PhpWordTests/Style/NumberingLevelTest.php index 41e4f3ef..5459e884 100644 --- a/tests/PhpWord/Style/NumberingLevelTest.php +++ b/tests/PhpWordTests/Style/NumberingLevelTest.php @@ -15,9 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; use PhpOffice\PhpWord\SimpleType\Jc; +use PhpOffice\PhpWord\Style\NumberingLevel; /** * Test class for PhpOffice\PhpWord\Style\NumberingLevel. diff --git a/tests/PhpWord/Style/NumberingTest.php b/tests/PhpWordTests/Style/NumberingTest.php similarity index 95% rename from tests/PhpWord/Style/NumberingTest.php rename to tests/PhpWordTests/Style/NumberingTest.php index e3e1dcd1..0c2c5280 100644 --- a/tests/PhpWord/Style/NumberingTest.php +++ b/tests/PhpWordTests/Style/NumberingTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; + +use PhpOffice\PhpWord\Style\Numbering; /** * Test class for PhpOffice\PhpWord\Style\Numbering. diff --git a/tests/PhpWord/Style/PaperTest.php b/tests/PhpWordTests/Style/PaperTest.php similarity index 94% rename from tests/PhpWord/Style/PaperTest.php rename to tests/PhpWordTests/Style/PaperTest.php index 6f8fd2d6..89890795 100644 --- a/tests/PhpWord/Style/PaperTest.php +++ b/tests/PhpWordTests/Style/PaperTest.php @@ -15,9 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWord\Style\Paper; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Style\Paper. diff --git a/tests/PhpWord/Style/ParagraphTest.php b/tests/PhpWordTests/Style/ParagraphTest.php similarity index 97% rename from tests/PhpWord/Style/ParagraphTest.php rename to tests/PhpWordTests/Style/ParagraphTest.php index 17998136..124b8829 100644 --- a/tests/PhpWord/Style/ParagraphTest.php +++ b/tests/PhpWordTests/Style/ParagraphTest.php @@ -15,11 +15,13 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\LineSpacingRule; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWord\Style\Paragraph; +use PhpOffice\PhpWord\Style\Tab; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Style\Paragraph. diff --git a/tests/PhpWord/Style/RowTest.php b/tests/PhpWordTests/Style/RowTest.php similarity index 96% rename from tests/PhpWord/Style/RowTest.php rename to tests/PhpWordTests/Style/RowTest.php index 1d2b56ca..3ccd4084 100644 --- a/tests/PhpWord/Style/RowTest.php +++ b/tests/PhpWordTests/Style/RowTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; + +use PhpOffice\PhpWord\Style\Row; /** * Test class for PhpOffice\PhpWord\Style\Row. diff --git a/tests/PhpWord/Style/SectionTest.php b/tests/PhpWordTests/Style/SectionTest.php similarity index 99% rename from tests/PhpWord/Style/SectionTest.php rename to tests/PhpWordTests/Style/SectionTest.php index 581ef468..24efcb91 100644 --- a/tests/PhpWord/Style/SectionTest.php +++ b/tests/PhpWordTests/Style/SectionTest.php @@ -15,9 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; use PhpOffice\PhpWord\SimpleType\VerticalJc; +use PhpOffice\PhpWord\Style\Section; /** * Test class for PhpOffice\PhpWord\Style\Section. diff --git a/tests/PhpWord/Style/ShadingTest.php b/tests/PhpWordTests/Style/ShadingTest.php similarity index 94% rename from tests/PhpWord/Style/ShadingTest.php rename to tests/PhpWordTests/Style/ShadingTest.php index 0c03dc62..950cab45 100644 --- a/tests/PhpWord/Style/ShadingTest.php +++ b/tests/PhpWordTests/Style/ShadingTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; + +use PhpOffice\PhpWord\Style\Shading; /** * Test class for PhpOffice\PhpWord\Style\Shading. diff --git a/tests/PhpWord/Style/SpacingTest.php b/tests/PhpWordTests/Style/SpacingTest.php similarity index 95% rename from tests/PhpWord/Style/SpacingTest.php rename to tests/PhpWordTests/Style/SpacingTest.php index 04856de6..9e86b482 100644 --- a/tests/PhpWord/Style/SpacingTest.php +++ b/tests/PhpWordTests/Style/SpacingTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; + +use PhpOffice\PhpWord\Style\Spacing; /** * Test class for PhpOffice\PhpWord\Style\Spacing. diff --git a/tests/PhpWord/Style/TOCTest.php b/tests/PhpWordTests/Style/TOCTest.php similarity index 95% rename from tests/PhpWord/Style/TOCTest.php rename to tests/PhpWordTests/Style/TOCTest.php index 78b8fa36..cf0a7248 100644 --- a/tests/PhpWord/Style/TOCTest.php +++ b/tests/PhpWordTests/Style/TOCTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; + +use PhpOffice\PhpWord\Style\TOC; /** * Test class for PhpOffice\PhpWord\Style\TOC. diff --git a/tests/PhpWord/Style/TabTest.php b/tests/PhpWordTests/Style/TabTest.php similarity index 95% rename from tests/PhpWord/Style/TabTest.php rename to tests/PhpWordTests/Style/TabTest.php index 13769df8..f89706b9 100644 --- a/tests/PhpWord/Style/TabTest.php +++ b/tests/PhpWordTests/Style/TabTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; + +use PhpOffice\PhpWord\Style\Tab; /** * Test class for PhpOffice\PhpWord\Style\Tab. diff --git a/tests/PhpWord/Style/TablePositionTest.php b/tests/PhpWordTests/Style/TablePositionTest.php similarity index 95% rename from tests/PhpWord/Style/TablePositionTest.php rename to tests/PhpWordTests/Style/TablePositionTest.php index 24f157b4..2c1279fe 100644 --- a/tests/PhpWord/Style/TablePositionTest.php +++ b/tests/PhpWordTests/Style/TablePositionTest.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; + +use PhpOffice\PhpWord\Style\TablePosition; /** * Test class for PhpOffice\PhpWord\Style\Table. diff --git a/tests/PhpWord/Style/TableTest.php b/tests/PhpWordTests/Style/TableTest.php similarity index 98% rename from tests/PhpWord/Style/TableTest.php rename to tests/PhpWordTests/Style/TableTest.php index 516dad9a..393271ca 100644 --- a/tests/PhpWord/Style/TableTest.php +++ b/tests/PhpWordTests/Style/TableTest.php @@ -15,11 +15,13 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; use PhpOffice\PhpWord\ComplexType\TblWidth as TblWidthComplexType; use PhpOffice\PhpWord\SimpleType\JcTable; use PhpOffice\PhpWord\SimpleType\TblWidth; +use PhpOffice\PhpWord\Style\Table; +use PhpOffice\PhpWord\Style\TablePosition; /** * Test class for PhpOffice\PhpWord\Style\Table. diff --git a/tests/PhpWord/Style/TextBoxTest.php b/tests/PhpWordTests/Style/TextBoxTest.php similarity index 99% rename from tests/PhpWord/Style/TextBoxTest.php rename to tests/PhpWordTests/Style/TextBoxTest.php index 160977bf..3c1c2436 100644 --- a/tests/PhpWord/Style/TextBoxTest.php +++ b/tests/PhpWordTests/Style/TextBoxTest.php @@ -15,10 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Style; +namespace PhpOffice\PhpWordTests\Style; use InvalidArgumentException; use PhpOffice\PhpWord\SimpleType\Jc; +use PhpOffice\PhpWord\Style\TextBox; /** * Test class for PhpOffice\PhpWord\Style\Image. diff --git a/tests/PhpWord/StyleTest.php b/tests/PhpWordTests/StyleTest.php similarity index 98% rename from tests/PhpWord/StyleTest.php rename to tests/PhpWordTests/StyleTest.php index 83f9279e..30f37ff4 100644 --- a/tests/PhpWord/StyleTest.php +++ b/tests/PhpWordTests/StyleTest.php @@ -15,9 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord; +namespace PhpOffice\PhpWordTests; use PhpOffice\PhpWord\SimpleType\Jc; +use PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\Style. diff --git a/tests/PhpWord/TemplateProcessorTest.php b/tests/PhpWordTests/TemplateProcessorTest.php similarity index 99% rename from tests/PhpWord/TemplateProcessorTest.php rename to tests/PhpWordTests/TemplateProcessorTest.php index 46ace0e7..fc975fab 100644 --- a/tests/PhpWord/TemplateProcessorTest.php +++ b/tests/PhpWordTests/TemplateProcessorTest.php @@ -15,12 +15,16 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord; +namespace PhpOffice\PhpWordTests; use DOMDocument; use Exception; use PhpOffice\PhpWord\Element\Text; use PhpOffice\PhpWord\Element\TextRun; +use PhpOffice\PhpWord\IOFactory; +use PhpOffice\PhpWord\PhpWord; +use PhpOffice\PhpWord\Settings; +use PhpOffice\PhpWord\TemplateProcessor; use ZipArchive; /** diff --git a/tests/PhpWord/_includes/TestHelperDOCX.php b/tests/PhpWordTests/TestHelperDOCX.php similarity index 94% rename from tests/PhpWord/_includes/TestHelperDOCX.php rename to tests/PhpWordTests/TestHelperDOCX.php index 6b451507..5582b68b 100644 --- a/tests/PhpWord/_includes/TestHelperDOCX.php +++ b/tests/PhpWordTests/TestHelperDOCX.php @@ -15,9 +15,12 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord; +namespace PhpOffice\PhpWordTests; use PhpOffice\PhpWord\Exception\CreateTemporaryFileException; +use PhpOffice\PhpWord\IOFactory; +use PhpOffice\PhpWord\PhpWord; +use PhpOffice\PhpWord\Settings; use ZipArchive; /** @@ -40,7 +43,7 @@ class TestHelperDOCX * @param \PhpOffice\PhpWord\PhpWord $phpWord * @param string $writerName * - * @return \PhpOffice\PhpWord\XmlDocument + * @return \PhpOffice\PhpWordTests\XmlDocument */ public static function getDocument(PhpWord $phpWord, $writerName = 'Word2007') { diff --git a/tests/PhpWord/_includes/TestableTemplateProcesor.php b/tests/PhpWordTests/TestableTemplateProcesor.php similarity index 96% rename from tests/PhpWord/_includes/TestableTemplateProcesor.php rename to tests/PhpWordTests/TestableTemplateProcesor.php index 851dd0a7..32657b14 100644 --- a/tests/PhpWord/_includes/TestableTemplateProcesor.php +++ b/tests/PhpWordTests/TestableTemplateProcesor.php @@ -15,7 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord; +namespace PhpOffice\PhpWordTests; + +use PhpOffice\PhpWord\TemplateProcessor; /** * This class is used to expose publicly methods that are otherwise private or protected. diff --git a/tests/PhpWord/Writer/HTML/ElementTest.php b/tests/PhpWordTests/Writer/HTML/ElementTest.php similarity index 99% rename from tests/PhpWord/Writer/HTML/ElementTest.php rename to tests/PhpWordTests/Writer/HTML/ElementTest.php index ca3ccb87..ccdd5eaf 100644 --- a/tests/PhpWord/Writer/HTML/ElementTest.php +++ b/tests/PhpWordTests/Writer/HTML/ElementTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\HTML; +namespace PhpOffice\PhpWordTests\Writer\HTML; use DateTime; use DOMDocument; diff --git a/tests/PhpWord/Writer/HTML/PartTest.php b/tests/PhpWordTests/Writer/HTML/PartTest.php similarity index 95% rename from tests/PhpWord/Writer/HTML/PartTest.php rename to tests/PhpWordTests/Writer/HTML/PartTest.php index d1d747ce..19f11474 100644 --- a/tests/PhpWord/Writer/HTML/PartTest.php +++ b/tests/PhpWordTests/Writer/HTML/PartTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\HTML; +namespace PhpOffice\PhpWordTests\Writer\HTML; use PhpOffice\PhpWord\Writer\HTML\Part\Body; diff --git a/tests/PhpWord/Writer/HTML/StyleTest.php b/tests/PhpWordTests/Writer/HTML/StyleTest.php similarity index 96% rename from tests/PhpWord/Writer/HTML/StyleTest.php rename to tests/PhpWordTests/Writer/HTML/StyleTest.php index c5a22726..7c360e1a 100644 --- a/tests/PhpWord/Writer/HTML/StyleTest.php +++ b/tests/PhpWordTests/Writer/HTML/StyleTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\HTML; +namespace PhpOffice\PhpWordTests\Writer\HTML; /** * Test class for PhpOffice\PhpWord\Writer\HTML\Style subnamespace. diff --git a/tests/PhpWord/Writer/HTMLTest.php b/tests/PhpWordTests/Writer/HTMLTest.php similarity index 97% rename from tests/PhpWord/Writer/HTMLTest.php rename to tests/PhpWordTests/Writer/HTMLTest.php index 8771ead9..35b07989 100644 --- a/tests/PhpWord/Writer/HTMLTest.php +++ b/tests/PhpWordTests/Writer/HTMLTest.php @@ -15,9 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer; +namespace PhpOffice\PhpWordTests\Writer; -use PhpOffice\PhpWord\AbstractWebServerEmbeddedTest; +use PhpOffice\PhpWord\Writer\HTML; +use PhpOffice\PhpWordTests\AbstractWebServerEmbeddedTest; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Settings; use PhpOffice\PhpWord\SimpleType\Jc; diff --git a/tests/PhpWord/Writer/ODText/Element/ImageTest.php b/tests/PhpWordTests/Writer/ODText/Element/ImageTest.php similarity index 96% rename from tests/PhpWord/Writer/ODText/Element/ImageTest.php rename to tests/PhpWordTests/Writer/ODText/Element/ImageTest.php index 1ccb5f6f..e150418c 100644 --- a/tests/PhpWord/Writer/ODText/Element/ImageTest.php +++ b/tests/PhpWordTests/Writer/ODText/Element/ImageTest.php @@ -15,10 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\ODText\Style; +namespace PhpOffice\PhpWordTests\Writer\ODText\Style; use PhpOffice\PhpWord\Style\Image; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\ODText\Element\Image. diff --git a/tests/PhpWord/Writer/ODText/ElementTest.php b/tests/PhpWordTests/Writer/ODText/ElementTest.php similarity index 99% rename from tests/PhpWord/Writer/ODText/ElementTest.php rename to tests/PhpWordTests/Writer/ODText/ElementTest.php index b272ba7f..45f542b3 100644 --- a/tests/PhpWord/Writer/ODText/ElementTest.php +++ b/tests/PhpWordTests/Writer/ODText/ElementTest.php @@ -15,13 +15,13 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\ODText; +namespace PhpOffice\PhpWordTests\Writer\ODText; use DateTime; use PhpOffice\PhpWord\Element\TrackChange; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Shared\XMLWriter; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\ODText\Element subnamespace. diff --git a/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php b/tests/PhpWordTests/Writer/ODText/Part/AbstractPartTest.php similarity index 84% rename from tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php rename to tests/PhpWordTests/Writer/ODText/Part/AbstractPartTest.php index b810ee7d..3ebc534b 100644 --- a/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php +++ b/tests/PhpWordTests/Writer/ODText/Part/AbstractPartTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\ODText\Part; +namespace PhpOffice\PhpWordTests\Writer\ODText\Part; use Exception; use PhpOffice\PhpWord\Writer\ODText; @@ -33,7 +33,7 @@ class AbstractPartTest extends \PHPUnit\Framework\TestCase */ public function testSetGetParentWriter(): void { - $object = $this->getMockForAbstractClass('PhpOffice\\PhpWord\\Writer\\ODText\\Part\\AbstractPart'); + $object = $this->getMockForAbstractClass(\PhpOffice\PhpWord\Writer\ODText\Part\AbstractPart::class); $object->setParentWriter(new ODText()); self::assertEquals(new ODText(), $object->getParentWriter()); } @@ -45,7 +45,7 @@ class AbstractPartTest extends \PHPUnit\Framework\TestCase { $this->expectException(Exception::class); $this->expectExceptionMessage('No parent WriterInterface assigned.'); - $object = $this->getMockForAbstractClass('PhpOffice\\PhpWord\\Writer\\ODText\\Part\\AbstractPart'); + $object = $this->getMockForAbstractClass(\PhpOffice\PhpWord\Writer\ODText\Part\AbstractPart::class); $object->getParentWriter(); } } diff --git a/tests/PhpWord/Writer/ODText/Part/ContentTest.php b/tests/PhpWordTests/Writer/ODText/Part/ContentTest.php similarity index 97% rename from tests/PhpWord/Writer/ODText/Part/ContentTest.php rename to tests/PhpWordTests/Writer/ODText/Part/ContentTest.php index 3dc89006..f86507ce 100644 --- a/tests/PhpWord/Writer/ODText/Part/ContentTest.php +++ b/tests/PhpWordTests/Writer/ODText/Part/ContentTest.php @@ -15,11 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\ODText\Part; +namespace PhpOffice\PhpWordTests\Writer\ODText\Part; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\ODText\Part\Content. diff --git a/tests/PhpWord/Writer/ODText/Style/FontTest.php b/tests/PhpWordTests/Writer/ODText/Style/FontTest.php similarity index 99% rename from tests/PhpWord/Writer/ODText/Style/FontTest.php rename to tests/PhpWordTests/Writer/ODText/Style/FontTest.php index 14bb8d39..dda0110a 100644 --- a/tests/PhpWord/Writer/ODText/Style/FontTest.php +++ b/tests/PhpWordTests/Writer/ODText/Style/FontTest.php @@ -15,10 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\ODText\Style; +namespace PhpOffice\PhpWordTests\Writer\ODText\Style; use PhpOffice\PhpWord\Style\Font; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for Headers, Footers, Tabs in ODT. diff --git a/tests/PhpWord/Writer/ODText/Style/ParagraphTest.php b/tests/PhpWordTests/Writer/ODText/Style/ParagraphTest.php similarity index 99% rename from tests/PhpWord/Writer/ODText/Style/ParagraphTest.php rename to tests/PhpWordTests/Writer/ODText/Style/ParagraphTest.php index 003bcb80..778bb20b 100644 --- a/tests/PhpWord/Writer/ODText/Style/ParagraphTest.php +++ b/tests/PhpWordTests/Writer/ODText/Style/ParagraphTest.php @@ -15,11 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\ODText\Style; +namespace PhpOffice\PhpWordTests\Writer\ODText\Style; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Shared\Converter; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for Headers, Footers, Tabs in ODT. diff --git a/tests/PhpWord/Writer/ODText/Style/SectionTest.php b/tests/PhpWordTests/Writer/ODText/Style/SectionTest.php similarity index 99% rename from tests/PhpWord/Writer/ODText/Style/SectionTest.php rename to tests/PhpWordTests/Writer/ODText/Style/SectionTest.php index d4485627..d9b6f6ee 100644 --- a/tests/PhpWord/Writer/ODText/Style/SectionTest.php +++ b/tests/PhpWordTests/Writer/ODText/Style/SectionTest.php @@ -15,10 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\ODText\Style; +namespace PhpOffice\PhpWordTests\Writer\ODText\Style; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for Headers, Footers, Tabs in ODT. diff --git a/tests/PhpWord/Writer/ODText/StyleTest.php b/tests/PhpWordTests/Writer/ODText/StyleTest.php similarity index 96% rename from tests/PhpWord/Writer/ODText/StyleTest.php rename to tests/PhpWordTests/Writer/ODText/StyleTest.php index c49d2e55..0d36b489 100644 --- a/tests/PhpWord/Writer/ODText/StyleTest.php +++ b/tests/PhpWordTests/Writer/ODText/StyleTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\ODText; +namespace PhpOffice\PhpWordTests\Writer\ODText; use PhpOffice\PhpWord\Shared\XMLWriter; diff --git a/tests/PhpWord/Writer/ODTextTest.php b/tests/PhpWordTests/Writer/ODTextTest.php similarity index 98% rename from tests/PhpWord/Writer/ODTextTest.php rename to tests/PhpWordTests/Writer/ODTextTest.php index 63406b01..060fda9e 100644 --- a/tests/PhpWord/Writer/ODTextTest.php +++ b/tests/PhpWordTests/Writer/ODTextTest.php @@ -15,10 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer; +namespace PhpOffice\PhpWordTests\Writer; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; +use PhpOffice\PhpWord\Writer\ODText; /** * Test class for PhpOffice\PhpWord\Writer\ODText. diff --git a/tests/PhpWord/Writer/PDF/DomPDFTest.php b/tests/PhpWordTests/Writer/PDF/DomPDFTest.php similarity index 98% rename from tests/PhpWord/Writer/PDF/DomPDFTest.php rename to tests/PhpWordTests/Writer/PDF/DomPDFTest.php index 75b3abd5..5365a9dc 100644 --- a/tests/PhpWord/Writer/PDF/DomPDFTest.php +++ b/tests/PhpWordTests/Writer/PDF/DomPDFTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\PDF; +namespace PhpOffice\PhpWordTests\Writer\PDF; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Settings; diff --git a/tests/PhpWord/Writer/PDF/MPDFTest.php b/tests/PhpWordTests/Writer/PDF/MPDFTest.php similarity index 97% rename from tests/PhpWord/Writer/PDF/MPDFTest.php rename to tests/PhpWordTests/Writer/PDF/MPDFTest.php index a110c305..44effe3b 100644 --- a/tests/PhpWord/Writer/PDF/MPDFTest.php +++ b/tests/PhpWordTests/Writer/PDF/MPDFTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\PDF; +namespace PhpOffice\PhpWordTests\Writer\PDF; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Settings; diff --git a/tests/PhpWord/Writer/PDF/TCPDFTest.php b/tests/PhpWordTests/Writer/PDF/TCPDFTest.php similarity index 97% rename from tests/PhpWord/Writer/PDF/TCPDFTest.php rename to tests/PhpWordTests/Writer/PDF/TCPDFTest.php index 8ba252a7..89e6acb7 100644 --- a/tests/PhpWord/Writer/PDF/TCPDFTest.php +++ b/tests/PhpWordTests/Writer/PDF/TCPDFTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\PDF; +namespace PhpOffice\PhpWordTests\Writer\PDF; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Settings; diff --git a/tests/PhpWord/Writer/PDFTest.php b/tests/PhpWordTests/Writer/PDFTest.php similarity index 95% rename from tests/PhpWord/Writer/PDFTest.php rename to tests/PhpWordTests/Writer/PDFTest.php index a4b0527a..72fae65e 100644 --- a/tests/PhpWord/Writer/PDFTest.php +++ b/tests/PhpWordTests/Writer/PDFTest.php @@ -15,10 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer; +namespace PhpOffice\PhpWordTests\Writer; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Settings; +use PhpOffice\PhpWord\Writer\PDF; /** * Test class for PhpOffice\PhpWord\Writer\PDF. diff --git a/tests/PhpWord/Writer/RTF/ElementTest.php b/tests/PhpWordTests/Writer/RTF/ElementTest.php similarity index 99% rename from tests/PhpWord/Writer/RTF/ElementTest.php rename to tests/PhpWordTests/Writer/RTF/ElementTest.php index db1d201c..7c154937 100644 --- a/tests/PhpWord/Writer/RTF/ElementTest.php +++ b/tests/PhpWordTests/Writer/RTF/ElementTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\RTF; +namespace PhpOffice\PhpWordTests\Writer\RTF; use PhpOffice\PhpWord\Writer\RTF; diff --git a/tests/PhpWord/Writer/RTF/HeaderFooterTest.php b/tests/PhpWordTests/Writer/RTF/HeaderFooterTest.php similarity index 98% rename from tests/PhpWord/Writer/RTF/HeaderFooterTest.php rename to tests/PhpWordTests/Writer/RTF/HeaderFooterTest.php index a1a3a7c0..ec71b2f0 100644 --- a/tests/PhpWord/Writer/RTF/HeaderFooterTest.php +++ b/tests/PhpWordTests/Writer/RTF/HeaderFooterTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\RTF; +namespace PhpOffice\PhpWordTests\Writer\RTF; use PhpOffice\PhpWord\Element\Footer; use PhpOffice\PhpWord\Writer\RTF; diff --git a/tests/PhpWord/Writer/RTF/StyleTest.php b/tests/PhpWordTests/Writer/RTF/StyleTest.php similarity index 99% rename from tests/PhpWord/Writer/RTF/StyleTest.php rename to tests/PhpWordTests/Writer/RTF/StyleTest.php index 142a98c6..0605e104 100644 --- a/tests/PhpWord/Writer/RTF/StyleTest.php +++ b/tests/PhpWordTests/Writer/RTF/StyleTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\RTF; +namespace PhpOffice\PhpWordTests\Writer\RTF; use PhpOffice\PhpWord\Writer\RTF; use PhpOffice\PhpWord\Writer\RTF\Style\Border; diff --git a/tests/PhpWord/Writer/RTFTest.php b/tests/PhpWordTests/Writer/RTFTest.php similarity index 98% rename from tests/PhpWord/Writer/RTFTest.php rename to tests/PhpWordTests/Writer/RTFTest.php index dc700b03..9b49eaf7 100644 --- a/tests/PhpWord/Writer/RTFTest.php +++ b/tests/PhpWordTests/Writer/RTFTest.php @@ -15,10 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer; +namespace PhpOffice\PhpWordTests\Writer; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; +use PhpOffice\PhpWord\Writer\RTF; /** * Test class for PhpOffice\PhpWord\Writer\RTF. diff --git a/tests/PhpWord/Writer/Word2007/Element/ChartTest.php b/tests/PhpWordTests/Writer/Word2007/Element/ChartTest.php similarity index 98% rename from tests/PhpWord/Writer/Word2007/Element/ChartTest.php rename to tests/PhpWordTests/Writer/Word2007/Element/ChartTest.php index 4662e4a1..0540c750 100644 --- a/tests/PhpWord/Writer/Word2007/Element/ChartTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Element/ChartTest.php @@ -15,11 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007; +namespace PhpOffice\PhpWordTests\Writer\Word2007\Element; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Settings; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Element subnamespace. diff --git a/tests/PhpWord/Writer/Word2007/Element/FormFieldTest.php b/tests/PhpWordTests/Writer/Word2007/Element/FormFieldTest.php similarity index 96% rename from tests/PhpWord/Writer/Word2007/Element/FormFieldTest.php rename to tests/PhpWordTests/Writer/Word2007/Element/FormFieldTest.php index 4df47d65..14e30d55 100644 --- a/tests/PhpWord/Writer/Word2007/Element/FormFieldTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Element/FormFieldTest.php @@ -15,10 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007; +namespace PhpOffice\PhpWordTests\Writer\Word2007; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Element subnamespace. diff --git a/tests/PhpWord/Writer/Word2007/ElementTest.php b/tests/PhpWordTests/Writer/Word2007/ElementTest.php similarity index 99% rename from tests/PhpWord/Writer/Word2007/ElementTest.php rename to tests/PhpWordTests/Writer/Word2007/ElementTest.php index cbb9608e..41c86f6b 100644 --- a/tests/PhpWord/Writer/Word2007/ElementTest.php +++ b/tests/PhpWordTests/Writer/Word2007/ElementTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007; +namespace PhpOffice\PhpWordTests\Writer\Word2007; use DateTime; use PhpOffice\PhpWord\Element\Comment; @@ -23,7 +23,7 @@ use PhpOffice\PhpWord\Element\TextRun; use PhpOffice\PhpWord\Element\TrackChange; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Shared\XMLWriter; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Element subnamespace. diff --git a/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php b/tests/PhpWordTests/Writer/Word2007/Part/AbstractPartTest.php similarity index 75% rename from tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php rename to tests/PhpWordTests/Writer/Word2007/Part/AbstractPartTest.php index 775ff6c6..6e376f3e 100644 --- a/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Part/AbstractPartTest.php @@ -15,16 +15,12 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007\Part; +namespace PhpOffice\PhpWordTests\Writer\Word2007\Part; use Exception; use PhpOffice\PhpWord\Writer\Word2007; /** - * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\AbstractWriterPart. - * - * @coversDefaultClass \PhpOffice\PhpWord\Writer\Word2007\Part\AbstractWriterPart - * * @runTestsInSeparateProcesses */ class AbstractPartTest extends \PHPUnit\Framework\TestCase @@ -35,7 +31,7 @@ class AbstractPartTest extends \PHPUnit\Framework\TestCase */ public function testSetGetParentWriter(): void { - $object = $this->getMockForAbstractClass('PhpOffice\\PhpWord\\Writer\\Word2007\\Part\\AbstractPart'); + $object = $this->getMockForAbstractClass(\PhpOffice\PhpWord\Writer\Word2007\Part\AbstractPart::class); $object->setParentWriter(new Word2007()); self::assertEquals(new Word2007(), $object->getParentWriter()); } @@ -47,7 +43,7 @@ class AbstractPartTest extends \PHPUnit\Framework\TestCase { $this->expectException(Exception::class); $this->expectExceptionMessage('No parent WriterInterface assigned.'); - $object = $this->getMockForAbstractClass('PhpOffice\\PhpWord\\Writer\\Word2007\\Part\\AbstractPart'); + $object = $this->getMockForAbstractClass(\PhpOffice\PhpWord\Writer\Word2007\Part\AbstractPart::class); $object->getParentWriter(); } } diff --git a/tests/PhpWord/Writer/Word2007/Part/CommentsTest.php b/tests/PhpWordTests/Writer/Word2007/Part/CommentsTest.php similarity index 94% rename from tests/PhpWord/Writer/Word2007/Part/CommentsTest.php rename to tests/PhpWordTests/Writer/Word2007/Part/CommentsTest.php index 60f8b866..38320363 100644 --- a/tests/PhpWord/Writer/Word2007/Part/CommentsTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Part/CommentsTest.php @@ -15,11 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007\Part; +namespace PhpOffice\PhpWordTests\Writer\Word2007\Part; use DateTime; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\Comment. diff --git a/tests/PhpWord/Writer/Word2007/Part/DocumentTest.php b/tests/PhpWordTests/Writer/Word2007/Part/DocumentTest.php similarity index 99% rename from tests/PhpWord/Writer/Word2007/Part/DocumentTest.php rename to tests/PhpWordTests/Writer/Word2007/Part/DocumentTest.php index 7ed9ad2c..00582e12 100644 --- a/tests/PhpWord/Writer/Word2007/Part/DocumentTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Part/DocumentTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007\Part; +namespace PhpOffice\PhpWordTests\Writer\Word2007\Part; use DateTime; use PhpOffice\PhpWord\ComplexType\FootnoteProperties; @@ -25,7 +25,7 @@ use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\SimpleType\NumberFormat; use PhpOffice\PhpWord\Style\Cell; use PhpOffice\PhpWord\Style\Font; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\Document. diff --git a/tests/PhpWord/Writer/Word2007/Part/FooterTest.php b/tests/PhpWordTests/Writer/Word2007/Part/FooterTest.php similarity index 94% rename from tests/PhpWord/Writer/Word2007/Part/FooterTest.php rename to tests/PhpWordTests/Writer/Word2007/Part/FooterTest.php index 0400b3bb..c4bc9d46 100644 --- a/tests/PhpWord/Writer/Word2007/Part/FooterTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Part/FooterTest.php @@ -15,8 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007\Part; +namespace PhpOffice\PhpWordTests\Writer\Word2007\Part; +use PhpOffice\PhpWord\Writer\Word2007\Part\Footer; use PhpOffice\PhpWord\Writer\Word2007; /** diff --git a/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php b/tests/PhpWordTests/Writer/Word2007/Part/FootnotesTest.php similarity index 94% rename from tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php rename to tests/PhpWordTests/Writer/Word2007/Part/FootnotesTest.php index bd9e90cc..14872970 100644 --- a/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Part/FootnotesTest.php @@ -15,11 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007\Part; +namespace PhpOffice\PhpWordTests\Writer\Word2007\Part; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * @coversNothing diff --git a/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php b/tests/PhpWordTests/Writer/Word2007/Part/HeaderTest.php similarity index 94% rename from tests/PhpWord/Writer/Word2007/Part/HeaderTest.php rename to tests/PhpWordTests/Writer/Word2007/Part/HeaderTest.php index f99d0017..e26badec 100644 --- a/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Part/HeaderTest.php @@ -15,8 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007\Part; +namespace PhpOffice\PhpWordTests\Writer\Word2007\Part; +use PhpOffice\PhpWord\Writer\Word2007\Part\Header; use PhpOffice\PhpWord\Writer\Word2007; /** diff --git a/tests/PhpWord/Writer/Word2007/Part/NumberingTest.php b/tests/PhpWordTests/Writer/Word2007/Part/NumberingTest.php similarity index 95% rename from tests/PhpWord/Writer/Word2007/Part/NumberingTest.php rename to tests/PhpWordTests/Writer/Word2007/Part/NumberingTest.php index 4309407a..88de8f44 100644 --- a/tests/PhpWord/Writer/Word2007/Part/NumberingTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Part/NumberingTest.php @@ -15,12 +15,12 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007\Part; +namespace PhpOffice\PhpWordTests\Writer\Word2007\Part; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\SimpleType\NumberFormat; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\Numbering. diff --git a/tests/PhpWord/Writer/Word2007/Part/SettingsTest.php b/tests/PhpWordTests/Writer/Word2007/Part/SettingsTest.php similarity index 99% rename from tests/PhpWord/Writer/Word2007/Part/SettingsTest.php rename to tests/PhpWordTests/Writer/Word2007/Part/SettingsTest.php index e34d4be6..e60e03f7 100644 --- a/tests/PhpWord/Writer/Word2007/Part/SettingsTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Part/SettingsTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007\Part; +namespace PhpOffice\PhpWordTests\Writer\Word2007\Part; use PhpOffice\PhpWord\ComplexType\ProofState; use PhpOffice\PhpWord\ComplexType\TrackChangesView; @@ -23,7 +23,7 @@ use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Shared\Microsoft\PasswordEncoder; use PhpOffice\PhpWord\SimpleType\Zoom; use PhpOffice\PhpWord\Style\Language; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\Settings. diff --git a/tests/PhpWord/Writer/Word2007/Part/StylesTest.php b/tests/PhpWordTests/Writer/Word2007/Part/StylesTest.php similarity index 98% rename from tests/PhpWord/Writer/Word2007/Part/StylesTest.php rename to tests/PhpWordTests/Writer/Word2007/Part/StylesTest.php index 674d79c3..eafee33b 100644 --- a/tests/PhpWord/Writer/Word2007/Part/StylesTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Part/StylesTest.php @@ -15,13 +15,13 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007\Part; +namespace PhpOffice\PhpWordTests\Writer\Word2007\Part; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Style\Paragraph; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\Styles. diff --git a/tests/PhpWord/Writer/Word2007/PartTest.php b/tests/PhpWordTests/Writer/Word2007/PartTest.php similarity index 96% rename from tests/PhpWord/Writer/Word2007/PartTest.php rename to tests/PhpWordTests/Writer/Word2007/PartTest.php index f709ea55..a3bc47b4 100644 --- a/tests/PhpWord/Writer/Word2007/PartTest.php +++ b/tests/PhpWordTests/Writer/Word2007/PartTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007; +namespace PhpOffice\PhpWordTests\Writer\Word2007; use PhpOffice\PhpWord\Writer\Word2007\Part\RelsPart; diff --git a/tests/PhpWord/Writer/Word2007/Style/FontTest.php b/tests/PhpWordTests/Writer/Word2007/Style/FontTest.php similarity index 98% rename from tests/PhpWord/Writer/Word2007/Style/FontTest.php rename to tests/PhpWordTests/Writer/Word2007/Style/FontTest.php index 132b38ec..2c10b5ff 100644 --- a/tests/PhpWord/Writer/Word2007/Style/FontTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Style/FontTest.php @@ -15,9 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007\Style; +namespace PhpOffice\PhpWordTests\Writer\Word2007\Style; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Style\Font. diff --git a/tests/PhpWord/Writer/Word2007/Style/ImageTest.php b/tests/PhpWordTests/Writer/Word2007/Style/ImageTest.php similarity index 97% rename from tests/PhpWord/Writer/Word2007/Style/ImageTest.php rename to tests/PhpWordTests/Writer/Word2007/Style/ImageTest.php index 68640807..53ecba2d 100644 --- a/tests/PhpWord/Writer/Word2007/Style/ImageTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Style/ImageTest.php @@ -15,10 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007\Style; +namespace PhpOffice\PhpWordTests\Writer\Word2007\Style; use PhpOffice\PhpWord\Style\Image; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Style\Font. diff --git a/tests/PhpWord/Writer/Word2007/Style/ParagraphTest.php b/tests/PhpWordTests/Writer/Word2007/Style/ParagraphTest.php similarity index 97% rename from tests/PhpWord/Writer/Word2007/Style/ParagraphTest.php rename to tests/PhpWordTests/Writer/Word2007/Style/ParagraphTest.php index 3e43bb49..759a0003 100644 --- a/tests/PhpWord/Writer/Word2007/Style/ParagraphTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Style/ParagraphTest.php @@ -15,10 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007\Style; +namespace PhpOffice\PhpWordTests\Writer\Word2007\Style; use PhpOffice\PhpWord\Style\Paragraph as ParagraphStyle; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Style\Paragraph. diff --git a/tests/PhpWord/Writer/Word2007/Style/SectionTest.php b/tests/PhpWordTests/Writer/Word2007/Style/SectionTest.php similarity index 95% rename from tests/PhpWord/Writer/Word2007/Style/SectionTest.php rename to tests/PhpWordTests/Writer/Word2007/Style/SectionTest.php index 756f5ab8..e8f2dc67 100644 --- a/tests/PhpWord/Writer/Word2007/Style/SectionTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Style/SectionTest.php @@ -15,10 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007\Style; +namespace PhpOffice\PhpWordTests\Writer\Word2007\Style; use PhpOffice\PhpWord\Settings; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Style\Section. diff --git a/tests/PhpWord/Writer/Word2007/Style/TableTest.php b/tests/PhpWordTests/Writer/Word2007/Style/TableTest.php similarity index 98% rename from tests/PhpWord/Writer/Word2007/Style/TableTest.php rename to tests/PhpWordTests/Writer/Word2007/Style/TableTest.php index 7cc32307..b072bb8a 100644 --- a/tests/PhpWord/Writer/Word2007/Style/TableTest.php +++ b/tests/PhpWordTests/Writer/Word2007/Style/TableTest.php @@ -15,13 +15,13 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007\Style; +namespace PhpOffice\PhpWordTests\Writer\Word2007\Style; use PhpOffice\PhpWord\ComplexType\TblWidth as TblWidthComplexType; use PhpOffice\PhpWord\SimpleType\TblWidth; use PhpOffice\PhpWord\Style\Table; use PhpOffice\PhpWord\Style\TablePosition; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Style\Table. diff --git a/tests/PhpWord/Writer/Word2007/StyleTest.php b/tests/PhpWordTests/Writer/Word2007/StyleTest.php similarity index 97% rename from tests/PhpWord/Writer/Word2007/StyleTest.php rename to tests/PhpWordTests/Writer/Word2007/StyleTest.php index 8096da52..0db61e8c 100644 --- a/tests/PhpWord/Writer/Word2007/StyleTest.php +++ b/tests/PhpWordTests/Writer/Word2007/StyleTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007; +namespace PhpOffice\PhpWordTests\Writer\Word2007; use PhpOffice\PhpWord\Shared\XMLWriter; diff --git a/tests/PhpWord/Writer/Word2007Test.php b/tests/PhpWordTests/Writer/Word2007Test.php similarity index 96% rename from tests/PhpWord/Writer/Word2007Test.php rename to tests/PhpWordTests/Writer/Word2007Test.php index 4710ea9a..df0b157b 100644 --- a/tests/PhpWord/Writer/Word2007Test.php +++ b/tests/PhpWordTests/Writer/Word2007Test.php @@ -15,12 +15,13 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer; +namespace PhpOffice\PhpWordTests\Writer; -use PhpOffice\PhpWord\AbstractWebServerEmbeddedTest; +use PhpOffice\PhpWord\Writer\Word2007; +use PhpOffice\PhpWordTests\AbstractWebServerEmbeddedTest; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\TestHelperDOCX; +use PhpOffice\PhpWordTests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007. diff --git a/tests/PhpWord/_includes/XmlDocument.php b/tests/PhpWordTests/XmlDocument.php similarity index 99% rename from tests/PhpWord/_includes/XmlDocument.php rename to tests/PhpWordTests/XmlDocument.php index ec74ae0c..6604eccf 100644 --- a/tests/PhpWord/_includes/XmlDocument.php +++ b/tests/PhpWordTests/XmlDocument.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord; +namespace PhpOffice\PhpWordTests; use DOMDocument; use DOMElement; diff --git a/tests/PhpWord/_files/documents/reader-2011.docx b/tests/PhpWordTests/_files/documents/reader-2011.docx similarity index 100% rename from tests/PhpWord/_files/documents/reader-2011.docx rename to tests/PhpWordTests/_files/documents/reader-2011.docx diff --git a/tests/PhpWord/_files/documents/reader.doc b/tests/PhpWordTests/_files/documents/reader.doc similarity index 100% rename from tests/PhpWord/_files/documents/reader.doc rename to tests/PhpWordTests/_files/documents/reader.doc diff --git a/tests/PhpWord/_files/documents/reader.docx b/tests/PhpWordTests/_files/documents/reader.docx similarity index 100% rename from tests/PhpWord/_files/documents/reader.docx rename to tests/PhpWordTests/_files/documents/reader.docx diff --git a/tests/PhpWord/_files/documents/reader.docx.zip b/tests/PhpWordTests/_files/documents/reader.docx.zip similarity index 100% rename from tests/PhpWord/_files/documents/reader.docx.zip rename to tests/PhpWordTests/_files/documents/reader.docx.zip diff --git a/tests/PhpWord/_files/documents/reader.html b/tests/PhpWordTests/_files/documents/reader.html similarity index 100% rename from tests/PhpWord/_files/documents/reader.html rename to tests/PhpWordTests/_files/documents/reader.html diff --git a/tests/PhpWord/_files/documents/reader.odt b/tests/PhpWordTests/_files/documents/reader.odt similarity index 100% rename from tests/PhpWord/_files/documents/reader.odt rename to tests/PhpWordTests/_files/documents/reader.odt diff --git a/tests/PhpWord/_files/documents/reader.rtf b/tests/PhpWordTests/_files/documents/reader.rtf similarity index 100% rename from tests/PhpWord/_files/documents/reader.rtf rename to tests/PhpWordTests/_files/documents/reader.rtf diff --git a/tests/PhpWord/_files/documents/sheet.xls b/tests/PhpWordTests/_files/documents/sheet.xls similarity index 100% rename from tests/PhpWord/_files/documents/sheet.xls rename to tests/PhpWordTests/_files/documents/sheet.xls diff --git a/tests/PhpWord/_files/documents/without_table_macros.docx b/tests/PhpWordTests/_files/documents/without_table_macros.docx similarity index 100% rename from tests/PhpWord/_files/documents/without_table_macros.docx rename to tests/PhpWordTests/_files/documents/without_table_macros.docx diff --git a/tests/PhpWord/_files/images/PhpWord.png b/tests/PhpWordTests/_files/images/PhpWord.png similarity index 100% rename from tests/PhpWord/_files/images/PhpWord.png rename to tests/PhpWordTests/_files/images/PhpWord.png diff --git a/tests/PhpWord/_files/images/alexz-johnson.pcx b/tests/PhpWordTests/_files/images/alexz-johnson.pcx similarity index 100% rename from tests/PhpWord/_files/images/alexz-johnson.pcx rename to tests/PhpWordTests/_files/images/alexz-johnson.pcx diff --git a/tests/PhpWord/_files/images/angela_merkel.tif b/tests/PhpWordTests/_files/images/angela_merkel.tif similarity index 100% rename from tests/PhpWord/_files/images/angela_merkel.tif rename to tests/PhpWordTests/_files/images/angela_merkel.tif diff --git a/tests/PhpWord/_files/images/duke_nukem.bmp b/tests/PhpWordTests/_files/images/duke_nukem.bmp similarity index 100% rename from tests/PhpWord/_files/images/duke_nukem.bmp rename to tests/PhpWordTests/_files/images/duke_nukem.bmp diff --git a/tests/PhpWord/_files/images/earth.jpg b/tests/PhpWordTests/_files/images/earth.jpg similarity index 100% rename from tests/PhpWord/_files/images/earth.jpg rename to tests/PhpWordTests/_files/images/earth.jpg diff --git a/tests/PhpWord/_files/images/firefox.png b/tests/PhpWordTests/_files/images/firefox.png similarity index 100% rename from tests/PhpWord/_files/images/firefox.png rename to tests/PhpWordTests/_files/images/firefox.png diff --git a/tests/PhpWord/_files/images/mario.gif b/tests/PhpWordTests/_files/images/mario.gif similarity index 100% rename from tests/PhpWord/_files/images/mario.gif rename to tests/PhpWordTests/_files/images/mario.gif diff --git a/tests/PhpWord/_files/images/mars.jpg b/tests/PhpWordTests/_files/images/mars.jpg similarity index 100% rename from tests/PhpWord/_files/images/mars.jpg rename to tests/PhpWordTests/_files/images/mars.jpg diff --git a/tests/PhpWord/_files/images/mars_noext_jpg b/tests/PhpWordTests/_files/images/mars_noext_jpg similarity index 100% rename from tests/PhpWord/_files/images/mars_noext_jpg rename to tests/PhpWordTests/_files/images/mars_noext_jpg diff --git a/tests/PhpWord/_files/images/new-php-logo.png b/tests/PhpWordTests/_files/images/new-php-logo.png similarity index 100% rename from tests/PhpWord/_files/images/new-php-logo.png rename to tests/PhpWordTests/_files/images/new-php-logo.png diff --git a/tests/PhpWord/_files/templates/blank.docx b/tests/PhpWordTests/_files/templates/blank.docx similarity index 100% rename from tests/PhpWord/_files/templates/blank.docx rename to tests/PhpWordTests/_files/templates/blank.docx diff --git a/tests/PhpWord/_files/templates/clone-delete-block.docx b/tests/PhpWordTests/_files/templates/clone-delete-block.docx similarity index 100% rename from tests/PhpWord/_files/templates/clone-delete-block.docx rename to tests/PhpWordTests/_files/templates/clone-delete-block.docx diff --git a/tests/PhpWord/_files/templates/clone-merge.docx b/tests/PhpWordTests/_files/templates/clone-merge.docx similarity index 100% rename from tests/PhpWord/_files/templates/clone-merge.docx rename to tests/PhpWordTests/_files/templates/clone-merge.docx diff --git a/tests/PhpWord/_files/templates/corrupted_main_document_part.docx b/tests/PhpWordTests/_files/templates/corrupted_main_document_part.docx similarity index 100% rename from tests/PhpWord/_files/templates/corrupted_main_document_part.docx rename to tests/PhpWordTests/_files/templates/corrupted_main_document_part.docx diff --git a/tests/PhpWord/_files/templates/document22-xml.docx b/tests/PhpWordTests/_files/templates/document22-xml.docx similarity index 100% rename from tests/PhpWord/_files/templates/document22-xml.docx rename to tests/PhpWordTests/_files/templates/document22-xml.docx diff --git a/tests/PhpWord/_files/templates/header-footer.docx b/tests/PhpWordTests/_files/templates/header-footer.docx similarity index 100% rename from tests/PhpWord/_files/templates/header-footer.docx rename to tests/PhpWordTests/_files/templates/header-footer.docx diff --git a/tests/PhpWord/_files/templates/with_table_macros.docx b/tests/PhpWordTests/_files/templates/with_table_macros.docx similarity index 100% rename from tests/PhpWord/_files/templates/with_table_macros.docx rename to tests/PhpWordTests/_files/templates/with_table_macros.docx diff --git a/tests/PhpWord/_files/xml/reader.zip b/tests/PhpWordTests/_files/xml/reader.zip similarity index 100% rename from tests/PhpWord/_files/xml/reader.zip rename to tests/PhpWordTests/_files/xml/reader.zip diff --git a/tests/PhpWord/_files/xsl/passthrough.xsl b/tests/PhpWordTests/_files/xsl/passthrough.xsl similarity index 100% rename from tests/PhpWord/_files/xsl/passthrough.xsl rename to tests/PhpWordTests/_files/xsl/passthrough.xsl diff --git a/tests/PhpWord/_files/xsl/remove_tables_by_needle.xsl b/tests/PhpWordTests/_files/xsl/remove_tables_by_needle.xsl similarity index 100% rename from tests/PhpWord/_files/xsl/remove_tables_by_needle.xsl rename to tests/PhpWordTests/_files/xsl/remove_tables_by_needle.xsl diff --git a/tests/bootstrap.php b/tests/bootstrap.php index defffcaf..c8e51248 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -23,16 +23,3 @@ if (!defined('PHPWORD_TESTS_BASE_DIR')) { define('PHPWORD_TESTS_BASE_DIR', realpath(__DIR__)); } -spl_autoload_register(function ($class): void { - $class = ltrim($class, '\\'); - $prefix = 'PhpOffice\\PhpWord'; - if (strpos($class, $prefix) === 0) { - $class = str_replace('\\', DIRECTORY_SEPARATOR, $class); - $class = implode(DIRECTORY_SEPARATOR, ['PhpWord', '_includes']) . - substr($class, strlen($prefix)); - $file = __DIR__ . DIRECTORY_SEPARATOR . $class . '.php'; - if (file_exists($file)) { - require_once $file; - } - } -});