diff --git a/.travis.yml b/.travis.yml
index 45bc405b..8ed7a45f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,7 +38,7 @@ before_script:
script:
## PHP_CodeSniffer
- phpcs --standard=PSR2 -n src/
- - phpcs --standard=PSR2 -n test/
+ - phpcs --standard=PSR2 -n tests/
## PHP Copy/Paste Detector
#- php phpcpd.phar --verbose src/
## PHP Mess Detector
diff --git a/README.md b/README.md
index 0663f1ae..d796dba3 100755
--- a/README.md
+++ b/README.md
@@ -1,7 +1,10 @@
-# 
+# 
-[](https://travis-ci.org/PHPOffice/PHPWord)
-[](https://packagist.org/packages/phpoffice/phpword) [](https://packagist.org/packages/phpoffice/phpword) [](https://packagist.org/packages/phpoffice/phpword) [](https://packagist.org/packages/phpoffice/phpword)
+[](https://travis-ci.org/PHPOffice/PHPWord)
+[](https://packagist.org/packages/phpoffice/phpword)
+[](https://packagist.org/packages/phpoffice/phpword)
+[](https://packagist.org/packages/phpoffice/phpword)
+[](https://packagist.org/packages/phpoffice/phpword)
PHPWord is a library written in pure PHP that provides a set of classes to write to and read from different document file formats. The current version of PHPWord supports Microsoft [Office Open XML](http://en.wikipedia.org/wiki/Office_Open_XML) (OOXML or OpenXML), OASIS [Open Document Format for Office Applications](http://en.wikipedia.org/wiki/OpenDocument) (OpenDocument or ODF), and [Rich Text Format](http://en.wikipedia.org/wiki/Rich_Text_Format) (RTF).
diff --git a/docs/images/phpword.svg b/docs/images/phpword.svg
new file mode 100644
index 00000000..2fbeeb4a
--- /dev/null
+++ b/docs/images/phpword.svg
@@ -0,0 +1,50 @@
+
+
+
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index b3897a83..05b08442 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,6 +1,6 @@
- ./test/PhpWord/
+ ./tests/PhpWord/
diff --git a/test/PhpWord/Tests/AutoloaderTest.php b/tests/PhpWord/Tests/AutoloaderTest.php
similarity index 100%
rename from test/PhpWord/Tests/AutoloaderTest.php
rename to tests/PhpWord/Tests/AutoloaderTest.php
diff --git a/test/PhpWord/Tests/DocumentPropertiesTest.php b/tests/PhpWord/Tests/DocumentPropertiesTest.php
similarity index 100%
rename from test/PhpWord/Tests/DocumentPropertiesTest.php
rename to tests/PhpWord/Tests/DocumentPropertiesTest.php
diff --git a/test/PhpWord/Tests/Exceptions/ExceptionTest.php b/tests/PhpWord/Tests/Exceptions/ExceptionTest.php
similarity index 100%
rename from test/PhpWord/Tests/Exceptions/ExceptionTest.php
rename to tests/PhpWord/Tests/Exceptions/ExceptionTest.php
diff --git a/test/PhpWord/Tests/Exceptions/InvalidImageExceptionTest.php b/tests/PhpWord/Tests/Exceptions/InvalidImageExceptionTest.php
similarity index 100%
rename from test/PhpWord/Tests/Exceptions/InvalidImageExceptionTest.php
rename to tests/PhpWord/Tests/Exceptions/InvalidImageExceptionTest.php
diff --git a/test/PhpWord/Tests/Exceptions/InvalidStyleExceptionTest.php b/tests/PhpWord/Tests/Exceptions/InvalidStyleExceptionTest.php
similarity index 100%
rename from test/PhpWord/Tests/Exceptions/InvalidStyleExceptionTest.php
rename to tests/PhpWord/Tests/Exceptions/InvalidStyleExceptionTest.php
diff --git a/test/PhpWord/Tests/Exceptions/UnsupportedImageTypeExceptionTest.php b/tests/PhpWord/Tests/Exceptions/UnsupportedImageTypeExceptionTest.php
similarity index 100%
rename from test/PhpWord/Tests/Exceptions/UnsupportedImageTypeExceptionTest.php
rename to tests/PhpWord/Tests/Exceptions/UnsupportedImageTypeExceptionTest.php
diff --git a/test/PhpWord/Tests/IOFactoryTest.php b/tests/PhpWord/Tests/IOFactoryTest.php
similarity index 100%
rename from test/PhpWord/Tests/IOFactoryTest.php
rename to tests/PhpWord/Tests/IOFactoryTest.php
diff --git a/test/PhpWord/Tests/MediaTest.php b/tests/PhpWord/Tests/MediaTest.php
similarity index 100%
rename from test/PhpWord/Tests/MediaTest.php
rename to tests/PhpWord/Tests/MediaTest.php
diff --git a/test/PhpWord/Tests/PhpWordTest.php b/tests/PhpWord/Tests/PhpWordTest.php
similarity index 100%
rename from test/PhpWord/Tests/PhpWordTest.php
rename to tests/PhpWord/Tests/PhpWordTest.php
diff --git a/test/PhpWord/Tests/Reader/Word2007Test.php b/tests/PhpWord/Tests/Reader/Word2007Test.php
similarity index 100%
rename from test/PhpWord/Tests/Reader/Word2007Test.php
rename to tests/PhpWord/Tests/Reader/Word2007Test.php
diff --git a/test/PhpWord/Tests/Section/Footer/PreserveTextTest.php b/tests/PhpWord/Tests/Section/Footer/PreserveTextTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/Footer/PreserveTextTest.php
rename to tests/PhpWord/Tests/Section/Footer/PreserveTextTest.php
diff --git a/test/PhpWord/Tests/Section/FooterTest.php b/tests/PhpWord/Tests/Section/FooterTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/FooterTest.php
rename to tests/PhpWord/Tests/Section/FooterTest.php
diff --git a/test/PhpWord/Tests/Section/FootnoteTest.php b/tests/PhpWord/Tests/Section/FootnoteTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/FootnoteTest.php
rename to tests/PhpWord/Tests/Section/FootnoteTest.php
diff --git a/test/PhpWord/Tests/Section/HeaderTest.php b/tests/PhpWord/Tests/Section/HeaderTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/HeaderTest.php
rename to tests/PhpWord/Tests/Section/HeaderTest.php
diff --git a/test/PhpWord/Tests/Section/ImageTest.php b/tests/PhpWord/Tests/Section/ImageTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/ImageTest.php
rename to tests/PhpWord/Tests/Section/ImageTest.php
diff --git a/test/PhpWord/Tests/Section/LinkTest.php b/tests/PhpWord/Tests/Section/LinkTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/LinkTest.php
rename to tests/PhpWord/Tests/Section/LinkTest.php
diff --git a/test/PhpWord/Tests/Section/ListItemTest.php b/tests/PhpWord/Tests/Section/ListItemTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/ListItemTest.php
rename to tests/PhpWord/Tests/Section/ListItemTest.php
diff --git a/tests/PhpWord/Tests/Section/MemoryImageTest.php b/tests/PhpWord/Tests/Section/MemoryImageTest.php
new file mode 100644
index 00000000..5dfef076
--- /dev/null
+++ b/tests/PhpWord/Tests/Section/MemoryImageTest.php
@@ -0,0 +1,78 @@
+assertInstanceOf('PhpOffice\\PhpWord\\Section\\MemoryImage', $oMemoryImage);
+ $this->assertEquals($oMemoryImage->getSource(), $src);
+ $this->assertEquals($oMemoryImage->getMediaId(), md5($src));
+ $this->assertEquals($oMemoryImage->getImageCreateFunction(), 'imagecreatefrompng');
+ $this->assertEquals($oMemoryImage->getImageFunction(), 'imagepng');
+ $this->assertEquals($oMemoryImage->getImageExtension(), 'png');
+ $this->assertEquals($oMemoryImage->getImageType(), 'image/png');
+ }
+
+ public function testGIF()
+ {
+ $src = __DIR__ . "/../_files/images/mario.gif";
+ $oMemoryImage = new MemoryImage($src);
+
+ $this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\MemoryImage', $oMemoryImage);
+ $this->assertEquals($oMemoryImage->getSource(), $src);
+ $this->assertEquals($oMemoryImage->getMediaId(), md5($src));
+ $this->assertEquals($oMemoryImage->getImageCreateFunction(), 'imagecreatefromgif');
+ $this->assertEquals($oMemoryImage->getImageFunction(), 'imagegif');
+ $this->assertEquals($oMemoryImage->getImageExtension(), 'gif');
+ $this->assertEquals($oMemoryImage->getImageType(), 'image/gif');
+ }
+
+ public function testJPG()
+ {
+ $src = __DIR__ . "/../_files/images/earth.jpg";
+ $oMemoryImage = new MemoryImage($src);
+
+ $this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\MemoryImage', $oMemoryImage);
+ $this->assertEquals($oMemoryImage->getSource(), $src);
+ $this->assertEquals($oMemoryImage->getMediaId(), md5($src));
+ $this->assertEquals($oMemoryImage->getImageCreateFunction(), 'imagecreatefromjpeg');
+ $this->assertEquals($oMemoryImage->getImageFunction(), 'imagejpeg');
+ $this->assertEquals($oMemoryImage->getImageExtension(), 'jpg');
+ $this->assertEquals($oMemoryImage->getImageType(), 'image/jpeg');
+ }
+
+ public function testBMP()
+ {
+ $oMemoryImage = new MemoryImage(__DIR__ . "/../_files/images/duke_nukem.bmp");
+
+ $this->assertInstanceOf('PhpOffice\\PhpWord\\Section\\MemoryImage', $oMemoryImage);
+ $this->assertEquals($oMemoryImage->getImageCreateFunction(), null);
+ $this->assertEquals($oMemoryImage->getImageFunction(), null);
+ $this->assertEquals($oMemoryImage->getImageExtension(), null);
+ $this->assertEquals($oMemoryImage->getImageType(), 'image/x-ms-bmp');
+ }
+
+ public function testStyle()
+ {
+ $oMemoryImage = new MemoryImage(
+ __DIR__ . "/../_files/images/earth.jpg",
+ array('width' => 210, 'height' => 210, 'align' => 'center')
+ );
+ $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Image', $oMemoryImage->getStyle());
+ }
+
+ public function testRelationID()
+ {
+ $oMemoryImage = new MemoryImage(__DIR__ . "/../_files/images/earth.jpg");
+
+ $iVal = rand(1, 1000);
+ $oMemoryImage->setRelationId($iVal);
+ $this->assertEquals($oMemoryImage->getRelationId(), $iVal);
+ }
+}
diff --git a/test/PhpWord/Tests/Section/ObjectTest.php b/tests/PhpWord/Tests/Section/ObjectTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/ObjectTest.php
rename to tests/PhpWord/Tests/Section/ObjectTest.php
diff --git a/test/PhpWord/Tests/Section/PageBreakTest.php b/tests/PhpWord/Tests/Section/PageBreakTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/PageBreakTest.php
rename to tests/PhpWord/Tests/Section/PageBreakTest.php
diff --git a/test/PhpWord/Tests/Section/SettingsTest.php b/tests/PhpWord/Tests/Section/SettingsTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/SettingsTest.php
rename to tests/PhpWord/Tests/Section/SettingsTest.php
diff --git a/test/PhpWord/Tests/Section/Table/CellTest.php b/tests/PhpWord/Tests/Section/Table/CellTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/Table/CellTest.php
rename to tests/PhpWord/Tests/Section/Table/CellTest.php
diff --git a/test/PhpWord/Tests/Section/Table/RowTest.php b/tests/PhpWord/Tests/Section/Table/RowTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/Table/RowTest.php
rename to tests/PhpWord/Tests/Section/Table/RowTest.php
diff --git a/test/PhpWord/Tests/Section/TableTest.php b/tests/PhpWord/Tests/Section/TableTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/TableTest.php
rename to tests/PhpWord/Tests/Section/TableTest.php
diff --git a/test/PhpWord/Tests/Section/TextBreakTest.php b/tests/PhpWord/Tests/Section/TextBreakTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/TextBreakTest.php
rename to tests/PhpWord/Tests/Section/TextBreakTest.php
diff --git a/test/PhpWord/Tests/Section/TextRunTest.php b/tests/PhpWord/Tests/Section/TextRunTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/TextRunTest.php
rename to tests/PhpWord/Tests/Section/TextRunTest.php
diff --git a/test/PhpWord/Tests/Section/TextTest.php b/tests/PhpWord/Tests/Section/TextTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/TextTest.php
rename to tests/PhpWord/Tests/Section/TextTest.php
diff --git a/test/PhpWord/Tests/Section/TitleTest.php b/tests/PhpWord/Tests/Section/TitleTest.php
similarity index 100%
rename from test/PhpWord/Tests/Section/TitleTest.php
rename to tests/PhpWord/Tests/Section/TitleTest.php
diff --git a/test/PhpWord/Tests/SectionTest.php b/tests/PhpWord/Tests/SectionTest.php
similarity index 100%
rename from test/PhpWord/Tests/SectionTest.php
rename to tests/PhpWord/Tests/SectionTest.php
diff --git a/test/PhpWord/Tests/SettingsTest.php b/tests/PhpWord/Tests/SettingsTest.php
similarity index 100%
rename from test/PhpWord/Tests/SettingsTest.php
rename to tests/PhpWord/Tests/SettingsTest.php
diff --git a/test/PhpWord/Tests/Shared/DrawingTest.php b/tests/PhpWord/Tests/Shared/DrawingTest.php
similarity index 100%
rename from test/PhpWord/Tests/Shared/DrawingTest.php
rename to tests/PhpWord/Tests/Shared/DrawingTest.php
diff --git a/test/PhpWord/Tests/Shared/FileTest.php b/tests/PhpWord/Tests/Shared/FileTest.php
similarity index 100%
rename from test/PhpWord/Tests/Shared/FileTest.php
rename to tests/PhpWord/Tests/Shared/FileTest.php
diff --git a/test/PhpWord/Tests/Shared/FontTest.php b/tests/PhpWord/Tests/Shared/FontTest.php
similarity index 100%
rename from test/PhpWord/Tests/Shared/FontTest.php
rename to tests/PhpWord/Tests/Shared/FontTest.php
diff --git a/test/PhpWord/Tests/Shared/StringTest.php b/tests/PhpWord/Tests/Shared/StringTest.php
similarity index 100%
rename from test/PhpWord/Tests/Shared/StringTest.php
rename to tests/PhpWord/Tests/Shared/StringTest.php
diff --git a/test/PhpWord/Tests/Style/CellTest.php b/tests/PhpWord/Tests/Style/CellTest.php
similarity index 100%
rename from test/PhpWord/Tests/Style/CellTest.php
rename to tests/PhpWord/Tests/Style/CellTest.php
diff --git a/test/PhpWord/Tests/Style/FontTest.php b/tests/PhpWord/Tests/Style/FontTest.php
similarity index 100%
rename from test/PhpWord/Tests/Style/FontTest.php
rename to tests/PhpWord/Tests/Style/FontTest.php
diff --git a/test/PhpWord/Tests/Style/ImageTest.php b/tests/PhpWord/Tests/Style/ImageTest.php
similarity index 100%
rename from test/PhpWord/Tests/Style/ImageTest.php
rename to tests/PhpWord/Tests/Style/ImageTest.php
diff --git a/test/PhpWord/Tests/Style/ListItemTest.php b/tests/PhpWord/Tests/Style/ListItemTest.php
similarity index 100%
rename from test/PhpWord/Tests/Style/ListItemTest.php
rename to tests/PhpWord/Tests/Style/ListItemTest.php
diff --git a/test/PhpWord/Tests/Style/ParagraphTest.php b/tests/PhpWord/Tests/Style/ParagraphTest.php
similarity index 100%
rename from test/PhpWord/Tests/Style/ParagraphTest.php
rename to tests/PhpWord/Tests/Style/ParagraphTest.php
diff --git a/test/PhpWord/Tests/Style/RowTest.php b/tests/PhpWord/Tests/Style/RowTest.php
similarity index 100%
rename from test/PhpWord/Tests/Style/RowTest.php
rename to tests/PhpWord/Tests/Style/RowTest.php
diff --git a/test/PhpWord/Tests/Style/TOCTest.php b/tests/PhpWord/Tests/Style/TOCTest.php
similarity index 100%
rename from test/PhpWord/Tests/Style/TOCTest.php
rename to tests/PhpWord/Tests/Style/TOCTest.php
diff --git a/tests/PhpWord/Tests/Style/TableFullTest.php b/tests/PhpWord/Tests/Style/TableFullTest.php
new file mode 100644
index 00000000..0552f357
--- /dev/null
+++ b/tests/PhpWord/Tests/Style/TableFullTest.php
@@ -0,0 +1,130 @@
+ 'FF0000');
+ $styleFirstRow = array('borderBottomSize' => 3);
+
+ $object = new TableFull($styleTable, $styleFirstRow);
+ $this->assertEquals('FF0000', $object->getBgColor());
+
+ $firstRow = $object->getFirstRow();
+ $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\TableFull', $firstRow);
+ $this->assertEquals(3, $firstRow->getBorderBottomSize());
+ }
+
+ /**
+ * Test setting style with normal value
+ */
+ public function testSetGetNormal()
+ {
+ $object = new TableFull();
+
+ $attributes = array(
+ 'bgColor' => 'FF0000',
+ 'borderTopSize' => 4,
+ 'borderTopColor' => 'FF0000',
+ 'borderLeftSize' => 4,
+ 'borderLeftColor' => 'FF0000',
+ 'borderRightSize' => 4,
+ 'borderRightColor' => 'FF0000',
+ 'borderBottomSize' => 4,
+ 'borderBottomColor' => 'FF0000',
+ 'borderInsideHSize' => 4,
+ 'borderInsideHColor' => 'FF0000',
+ 'borderInsideVSize' => 4,
+ 'borderInsideVColor' => 'FF0000',
+ 'cellMarginTop' => 240,
+ 'cellMarginLeft' => 240,
+ 'cellMarginRight' => 240,
+ 'cellMarginBottom' => 240,
+ );
+ foreach ($attributes as $key => $value) {
+ $set = "set{$key}";
+ $get = "get{$key}";
+ $object->$set($value);
+ $this->assertEquals($value, $object->$get());
+ }
+ }
+
+ /**
+ * Test border color
+ *
+ * Set border color and test if each part has the same color
+ * While looping, push values array to be asserted with getBorderColor
+ */
+ public function testBorderColor()
+ {
+ $object = new TableFull();
+ $parts = array('Top', 'Left', 'Right', 'Bottom', 'InsideH', 'InsideV');
+
+ $value = 'FF0000';
+ $object->setBorderColor($value);
+ foreach ($parts as $part) {
+ $get = "getBorder{$part}Color";
+ $values[] = $value;
+ $this->assertEquals($value, $object->$get());
+ }
+ $this->assertEquals($values, $object->getBorderColor());
+ }
+
+ /**
+ * Test border size
+ *
+ * Set border size and test if each part has the same size
+ * While looping, push values array to be asserted with getBorderSize
+ * Value is in eights of a point, i.e. 4 / 8 = .5pt
+ */
+ public function testBorderSize()
+ {
+ $object = new TableFull();
+ $parts = array('Top', 'Left', 'Right', 'Bottom', 'InsideH', 'InsideV');
+
+ $value = 4;
+ $object->setBorderSize($value);
+ foreach ($parts as $part) {
+ $get = "getBorder{$part}Size";
+ $values[] = $value;
+ $this->assertEquals($value, $object->$get());
+ }
+ $this->assertEquals($values, $object->getBorderSize());
+ }
+
+ /**
+ * Test cell margin
+ *
+ * Set cell margin and test if each part has the same margin
+ * While looping, push values array to be asserted with getCellMargin
+ * Value is in twips
+ */
+ public function testCellMargin()
+ {
+ $object = new TableFull();
+ $parts = array('Top', 'Left', 'Right', 'Bottom');
+
+ $value = 240;
+ $object->setCellMargin($value);
+ foreach ($parts as $part) {
+ $get = "getCellMargin{$part}";
+ $values[] = $value;
+ $this->assertEquals($value, $object->$get());
+ }
+ $this->assertEquals($values, $object->getCellMargin());
+ }
+}
diff --git a/test/PhpWord/Tests/Style/TableTest.php b/tests/PhpWord/Tests/Style/TableTest.php
similarity index 100%
rename from test/PhpWord/Tests/Style/TableTest.php
rename to tests/PhpWord/Tests/Style/TableTest.php
diff --git a/test/PhpWord/Tests/Style/TabsTest.php b/tests/PhpWord/Tests/Style/TabsTest.php
similarity index 100%
rename from test/PhpWord/Tests/Style/TabsTest.php
rename to tests/PhpWord/Tests/Style/TabsTest.php
diff --git a/test/PhpWord/Tests/StyleTest.php b/tests/PhpWord/Tests/StyleTest.php
similarity index 100%
rename from test/PhpWord/Tests/StyleTest.php
rename to tests/PhpWord/Tests/StyleTest.php
diff --git a/test/PhpWord/Tests/TOCTest.php b/tests/PhpWord/Tests/TOCTest.php
similarity index 100%
rename from test/PhpWord/Tests/TOCTest.php
rename to tests/PhpWord/Tests/TOCTest.php
diff --git a/test/PhpWord/Tests/TemplateTest.php b/tests/PhpWord/Tests/TemplateTest.php
similarity index 96%
rename from test/PhpWord/Tests/TemplateTest.php
rename to tests/PhpWord/Tests/TemplateTest.php
index f096e69d..c36ef408 100644
--- a/test/PhpWord/Tests/TemplateTest.php
+++ b/tests/PhpWord/Tests/TemplateTest.php
@@ -5,6 +5,7 @@ use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Template;
/**
+ * @covers \PhpOffice\PhpWord\Template
* @coversDefaultClass \PhpOffice\PhpWord\Template
*/
final class TemplateTest extends \PHPUnit_Framework_TestCase
@@ -115,8 +116,8 @@ final class TemplateTest extends \PHPUnit_Framework_TestCase
}
/**
- * @covers ::setValue
* @covers ::getVariables
+ * @covers ::setValue
* @covers ::cloneRow
* @covers ::saveAs
*/
@@ -126,13 +127,13 @@ final class TemplateTest extends \PHPUnit_Framework_TestCase
$expectedVar = array('tableHeader', 'userId', 'userName', 'userLocation');
$docName = 'clone-test-result.docx';
- $phpWord = new PhpWord();
- $document = $phpWord->loadTemplate($template);
+ $document = new Template($template);
$actualVar = $document->getVariables();
+ $document->setValue('tableHeader', utf8_decode('ééé'));
$document->cloneRow('userId', 1);
$document->setValue('userId#1', 'Test');
$document->saveAs($docName);
- $docFound = \file_exists($docName);
+ $docFound = file_exists($docName);
unlink($docName);
$this->assertEquals($expectedVar, $actualVar);
diff --git a/test/PhpWord/Tests/Writer/ODText/ContentTest.php b/tests/PhpWord/Tests/Writer/ODText/ContentTest.php
similarity index 100%
rename from test/PhpWord/Tests/Writer/ODText/ContentTest.php
rename to tests/PhpWord/Tests/Writer/ODText/ContentTest.php
diff --git a/test/PhpWord/Tests/Writer/ODText/WriterPartTest.php b/tests/PhpWord/Tests/Writer/ODText/WriterPartTest.php
similarity index 100%
rename from test/PhpWord/Tests/Writer/ODText/WriterPartTest.php
rename to tests/PhpWord/Tests/Writer/ODText/WriterPartTest.php
diff --git a/test/PhpWord/Tests/Writer/ODTextTest.php b/tests/PhpWord/Tests/Writer/ODTextTest.php
similarity index 100%
rename from test/PhpWord/Tests/Writer/ODTextTest.php
rename to tests/PhpWord/Tests/Writer/ODTextTest.php
diff --git a/test/PhpWord/Tests/Writer/RTFTest.php b/tests/PhpWord/Tests/Writer/RTFTest.php
similarity index 100%
rename from test/PhpWord/Tests/Writer/RTFTest.php
rename to tests/PhpWord/Tests/Writer/RTFTest.php
diff --git a/test/PhpWord/Tests/Writer/Word2007/BaseTest.php b/tests/PhpWord/Tests/Writer/Word2007/BaseTest.php
similarity index 100%
rename from test/PhpWord/Tests/Writer/Word2007/BaseTest.php
rename to tests/PhpWord/Tests/Writer/Word2007/BaseTest.php
diff --git a/test/PhpWord/Tests/Writer/Word2007/DocumentTest.php b/tests/PhpWord/Tests/Writer/Word2007/DocumentTest.php
similarity index 100%
rename from test/PhpWord/Tests/Writer/Word2007/DocumentTest.php
rename to tests/PhpWord/Tests/Writer/Word2007/DocumentTest.php
diff --git a/test/PhpWord/Tests/Writer/Word2007/FooterTest.php b/tests/PhpWord/Tests/Writer/Word2007/FooterTest.php
similarity index 100%
rename from test/PhpWord/Tests/Writer/Word2007/FooterTest.php
rename to tests/PhpWord/Tests/Writer/Word2007/FooterTest.php
diff --git a/test/PhpWord/Tests/Writer/Word2007/FootnotesTest.php b/tests/PhpWord/Tests/Writer/Word2007/FootnotesTest.php
similarity index 100%
rename from test/PhpWord/Tests/Writer/Word2007/FootnotesTest.php
rename to tests/PhpWord/Tests/Writer/Word2007/FootnotesTest.php
diff --git a/test/PhpWord/Tests/Writer/Word2007/HeaderTest.php b/tests/PhpWord/Tests/Writer/Word2007/HeaderTest.php
similarity index 100%
rename from test/PhpWord/Tests/Writer/Word2007/HeaderTest.php
rename to tests/PhpWord/Tests/Writer/Word2007/HeaderTest.php
diff --git a/test/PhpWord/Tests/Writer/Word2007/StylesTest.php b/tests/PhpWord/Tests/Writer/Word2007/StylesTest.php
similarity index 100%
rename from test/PhpWord/Tests/Writer/Word2007/StylesTest.php
rename to tests/PhpWord/Tests/Writer/Word2007/StylesTest.php
diff --git a/test/PhpWord/Tests/Writer/Word2007/WriterPartTest.php b/tests/PhpWord/Tests/Writer/Word2007/WriterPartTest.php
similarity index 100%
rename from test/PhpWord/Tests/Writer/Word2007/WriterPartTest.php
rename to tests/PhpWord/Tests/Writer/Word2007/WriterPartTest.php
diff --git a/test/PhpWord/Tests/Writer/Word2007Test.php b/tests/PhpWord/Tests/Writer/Word2007Test.php
similarity index 100%
rename from test/PhpWord/Tests/Writer/Word2007Test.php
rename to tests/PhpWord/Tests/Writer/Word2007Test.php
diff --git a/test/PhpWord/Tests/_files/documents/reader.docx b/tests/PhpWord/Tests/_files/documents/reader.docx
similarity index 100%
rename from test/PhpWord/Tests/_files/documents/reader.docx
rename to tests/PhpWord/Tests/_files/documents/reader.docx
diff --git a/test/PhpWord/Tests/_files/documents/reader.docx.zip b/tests/PhpWord/Tests/_files/documents/reader.docx.zip
similarity index 100%
rename from test/PhpWord/Tests/_files/documents/reader.docx.zip
rename to tests/PhpWord/Tests/_files/documents/reader.docx.zip
diff --git a/test/PhpWord/Tests/_files/documents/sheet.xls b/tests/PhpWord/Tests/_files/documents/sheet.xls
similarity index 100%
rename from test/PhpWord/Tests/_files/documents/sheet.xls
rename to tests/PhpWord/Tests/_files/documents/sheet.xls
diff --git a/test/PhpWord/Tests/_files/documents/without_table_macros.docx b/tests/PhpWord/Tests/_files/documents/without_table_macros.docx
similarity index 100%
rename from test/PhpWord/Tests/_files/documents/without_table_macros.docx
rename to tests/PhpWord/Tests/_files/documents/without_table_macros.docx
diff --git a/test/PhpWord/Tests/_files/images/PhpWord.png b/tests/PhpWord/Tests/_files/images/PhpWord.png
similarity index 100%
rename from test/PhpWord/Tests/_files/images/PhpWord.png
rename to tests/PhpWord/Tests/_files/images/PhpWord.png
diff --git a/test/PhpWord/Tests/_files/images/alexz-johnson.pcx b/tests/PhpWord/Tests/_files/images/alexz-johnson.pcx
similarity index 100%
rename from test/PhpWord/Tests/_files/images/alexz-johnson.pcx
rename to tests/PhpWord/Tests/_files/images/alexz-johnson.pcx
diff --git a/test/PhpWord/Tests/_files/images/angela_merkel.tif b/tests/PhpWord/Tests/_files/images/angela_merkel.tif
similarity index 100%
rename from test/PhpWord/Tests/_files/images/angela_merkel.tif
rename to tests/PhpWord/Tests/_files/images/angela_merkel.tif
diff --git a/test/PhpWord/Tests/_files/images/duke_nukem.bmp b/tests/PhpWord/Tests/_files/images/duke_nukem.bmp
similarity index 100%
rename from test/PhpWord/Tests/_files/images/duke_nukem.bmp
rename to tests/PhpWord/Tests/_files/images/duke_nukem.bmp
diff --git a/test/PhpWord/Tests/_files/images/earth.jpg b/tests/PhpWord/Tests/_files/images/earth.jpg
similarity index 100%
rename from test/PhpWord/Tests/_files/images/earth.jpg
rename to tests/PhpWord/Tests/_files/images/earth.jpg
diff --git a/test/PhpWord/Tests/_files/images/firefox.png b/tests/PhpWord/Tests/_files/images/firefox.png
similarity index 100%
rename from test/PhpWord/Tests/_files/images/firefox.png
rename to tests/PhpWord/Tests/_files/images/firefox.png
diff --git a/test/PhpWord/Tests/_files/images/mario.gif b/tests/PhpWord/Tests/_files/images/mario.gif
similarity index 100%
rename from test/PhpWord/Tests/_files/images/mario.gif
rename to tests/PhpWord/Tests/_files/images/mario.gif
diff --git a/test/PhpWord/Tests/_files/images/mars.jpg b/tests/PhpWord/Tests/_files/images/mars.jpg
similarity index 100%
rename from test/PhpWord/Tests/_files/images/mars.jpg
rename to tests/PhpWord/Tests/_files/images/mars.jpg
diff --git a/test/PhpWord/Tests/_files/images/mars_noext_jpg b/tests/PhpWord/Tests/_files/images/mars_noext_jpg
similarity index 100%
rename from test/PhpWord/Tests/_files/images/mars_noext_jpg
rename to tests/PhpWord/Tests/_files/images/mars_noext_jpg
diff --git a/test/PhpWord/Tests/_files/templates/blank.docx b/tests/PhpWord/Tests/_files/templates/blank.docx
similarity index 100%
rename from test/PhpWord/Tests/_files/templates/blank.docx
rename to tests/PhpWord/Tests/_files/templates/blank.docx
diff --git a/test/PhpWord/Tests/_files/templates/clone-merge.docx b/tests/PhpWord/Tests/_files/templates/clone-merge.docx
similarity index 100%
rename from test/PhpWord/Tests/_files/templates/clone-merge.docx
rename to tests/PhpWord/Tests/_files/templates/clone-merge.docx
diff --git a/test/PhpWord/Tests/_files/templates/corrupted_main_document_part.docx b/tests/PhpWord/Tests/_files/templates/corrupted_main_document_part.docx
similarity index 100%
rename from test/PhpWord/Tests/_files/templates/corrupted_main_document_part.docx
rename to tests/PhpWord/Tests/_files/templates/corrupted_main_document_part.docx
diff --git a/test/PhpWord/Tests/_files/templates/with_table_macros.docx b/tests/PhpWord/Tests/_files/templates/with_table_macros.docx
similarity index 100%
rename from test/PhpWord/Tests/_files/templates/with_table_macros.docx
rename to tests/PhpWord/Tests/_files/templates/with_table_macros.docx
diff --git a/test/PhpWord/Tests/_files/xsl/passthrough.xsl b/tests/PhpWord/Tests/_files/xsl/passthrough.xsl
similarity index 100%
rename from test/PhpWord/Tests/_files/xsl/passthrough.xsl
rename to tests/PhpWord/Tests/_files/xsl/passthrough.xsl
diff --git a/test/PhpWord/Tests/_files/xsl/remove_tables_by_needle.xsl b/tests/PhpWord/Tests/_files/xsl/remove_tables_by_needle.xsl
similarity index 100%
rename from test/PhpWord/Tests/_files/xsl/remove_tables_by_needle.xsl
rename to tests/PhpWord/Tests/_files/xsl/remove_tables_by_needle.xsl
diff --git a/test/PhpWord/Tests/_includes/TestHelperDOCX.php b/tests/PhpWord/Tests/_includes/TestHelperDOCX.php
similarity index 100%
rename from test/PhpWord/Tests/_includes/TestHelperDOCX.php
rename to tests/PhpWord/Tests/_includes/TestHelperDOCX.php
diff --git a/test/PhpWord/Tests/_includes/XmlDocument.php b/tests/PhpWord/Tests/_includes/XmlDocument.php
similarity index 100%
rename from test/PhpWord/Tests/_includes/XmlDocument.php
rename to tests/PhpWord/Tests/_includes/XmlDocument.php
diff --git a/test/bootstrap.php b/tests/bootstrap.php
similarity index 100%
rename from test/bootstrap.php
rename to tests/bootstrap.php