From 9d5368760719ef6770fa5ecb1ca46d9eb66c5fca Mon Sep 17 00:00:00 2001 From: wapmorgan Date: Thu, 20 Mar 2014 21:24:59 +0300 Subject: [PATCH 1/8] Update README.md Fix code --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d35603d0..5eb8d74c 100755 --- a/README.md +++ b/README.md @@ -210,8 +210,8 @@ $section->addText('I am simple paragraph', $fontStyle, $paragraphStyle); ```php $textrun = $section->createTextRun(); $textrun->addText('I am bold', array('bold' => true)); -$textrun->addText('I am italic, array('italic' => true)); -$textrun->addText('I am colored, array('color' => 'AACC00')); +$textrun->addText('I am italic', array('italic' => true)); +$textrun->addText('I am colored', array('color' => 'AACC00')); ``` @@ -298,4 +298,4 @@ $section->addImage( 'wrappingStyle' => 'behind' ) ); -``` \ No newline at end of file +``` From 17ab0ce3c0be6e7f269db2d6a65cd6182a2b1099 Mon Sep 17 00:00:00 2001 From: Ivan Lanin Date: Sun, 23 Mar 2014 22:44:57 +0700 Subject: [PATCH 2/8] Update .travis.yml Comment out phpmd since this is blocking the process. Please CMIIW. --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 99f33a20..77b9ca0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,9 +21,9 @@ before_script: ## PHP Mess Detector - pear config-set preferred_state beta - printf "\n" | pecl install imagick - - pear channel-discover pear.phpmd.org - - pear channel-discover pear.pdepend.org - - pear install --alldeps phpmd/PHP_PMD + #- pear channel-discover pear.phpmd.org + #- pear channel-discover pear.pdepend.org + #- pear install --alldeps phpmd/PHP_PMD - phpenv rehash ## PHPLOC - curl -o phploc.phar https://phar.phpunit.de/phploc.phar @@ -35,7 +35,7 @@ script: ## PHP Copy/Paste Detector - php phpcpd.phar --verbose Classes/ ## PHP Mess Detector - - phpmd Classes/ text unusedcode,naming,design + #- phpmd Classes/ text unusedcode,naming,design ## PHPLOC - php phploc.phar Classes/ ## PHPUnit From 5dac76a5e699c67987e1ab1f87bbc0bc65002f39 Mon Sep 17 00:00:00 2001 From: Gabriel Bull Date: Mon, 24 Mar 2014 06:39:19 -0400 Subject: [PATCH 3/8] Changed travis icon to SVG for us, poor souls with retina displays --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0663f1ae..8c397021 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ # ![PHPWord](https://raw.github.com/PHPOffice/PHPWord/develop/docs/images/phpword.png "PHPWord") -[![Build Status](https://travis-ci.org/PHPOffice/PHPWord.png?branch=master)](https://travis-ci.org/PHPOffice/PHPWord) -[![Latest Stable Version](https://poser.pugx.org/phpoffice/phpword/v/stable.png)](https://packagist.org/packages/phpoffice/phpword) [![Total Downloads](https://poser.pugx.org/phpoffice/phpword/downloads.png)](https://packagist.org/packages/phpoffice/phpword) [![Latest Unstable Version](https://poser.pugx.org/phpoffice/phpword/v/unstable.png)](https://packagist.org/packages/phpoffice/phpword) [![License](https://poser.pugx.org/phpoffice/phpword/license.png)](https://packagist.org/packages/phpoffice/phpword) +[![Build Status](https://travis-ci.org/PHPOffice/PHPWord.svg?branch=develop)](https://travis-ci.org/PHPOffice/PHPWord) +[![Latest Stable Version](https://poser.pugx.org/phpoffice/phpword/v/stable.png)](https://packagist.org/packages/phpoffice/phpword) +[![Total Downloads](https://poser.pugx.org/phpoffice/phpword/downloads.png)](https://packagist.org/packages/phpoffice/phpword) +[![Latest Unstable Version](https://poser.pugx.org/phpoffice/phpword/v/unstable.png)](https://packagist.org/packages/phpoffice/phpword) +[![License](https://poser.pugx.org/phpoffice/phpword/license.png)](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). From 286d37ca60da0a9136bf1b7710fd9a9f57dabeb2 Mon Sep 17 00:00:00 2001 From: Gabriel Bull Date: Mon, 24 Mar 2014 06:56:59 -0400 Subject: [PATCH 4/8] Changed PHPWord logo to SVG --- README.md | 2 +- docs/images/phpword.svg | 50 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 docs/images/phpword.svg diff --git a/README.md b/README.md index 8c397021..6a36664a 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ![PHPWord](https://raw.github.com/PHPOffice/PHPWord/develop/docs/images/phpword.png "PHPWord") +# ![PHPWord](https://raw.githubusercontent.com/PHPOffice/PHPWord/develop/docs/images/phpword.svg "PHPWord") [![Build Status](https://travis-ci.org/PHPOffice/PHPWord.svg?branch=develop)](https://travis-ci.org/PHPOffice/PHPWord) [![Latest Stable Version](https://poser.pugx.org/phpoffice/phpword/v/stable.png)](https://packagist.org/packages/phpoffice/phpword) 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 626902d9d17396961c398e1729534fadeed61ef7 Mon Sep 17 00:00:00 2001 From: Gabriel Bull Date: Mon, 24 Mar 2014 08:23:59 -0400 Subject: [PATCH 5/8] Renamed test directory to tests --- phpunit.xml.dist | 4 ++-- {test => tests}/PhpWord/Tests/AutoloaderTest.php | 0 .../PhpWord/Tests/DocumentPropertiesTest.php | 0 .../PhpWord/Tests/Exceptions/ExceptionTest.php | 0 .../Tests/Exceptions/InvalidImageExceptionTest.php | 0 .../Tests/Exceptions/InvalidStyleExceptionTest.php | 0 .../UnsupportedImageTypeExceptionTest.php | 0 {test => tests}/PhpWord/Tests/IOFactoryTest.php | 0 {test => tests}/PhpWord/Tests/MediaTest.php | 0 {test => tests}/PhpWord/Tests/PhpWordTest.php | 0 .../PhpWord/Tests/Reader/Word2007Test.php | 0 .../Tests/Section/Footer/PreserveTextTest.php | 0 .../PhpWord/Tests/Section/FooterTest.php | 0 .../PhpWord/Tests/Section/FootnoteTest.php | 0 .../PhpWord/Tests/Section/HeaderTest.php | 0 {test => tests}/PhpWord/Tests/Section/ImageTest.php | 0 {test => tests}/PhpWord/Tests/Section/LinkTest.php | 0 .../PhpWord/Tests/Section/ListItemTest.php | 0 .../PhpWord/Tests/Section/MemoryImageTest.php | 0 .../PhpWord/Tests/Section/ObjectTest.php | 0 .../PhpWord/Tests/Section/PageBreakTest.php | 0 .../PhpWord/Tests/Section/SettingsTest.php | 0 .../PhpWord/Tests/Section/Table/CellTest.php | 0 .../PhpWord/Tests/Section/Table/RowTest.php | 0 {test => tests}/PhpWord/Tests/Section/TableTest.php | 0 .../PhpWord/Tests/Section/TextBreakTest.php | 0 .../PhpWord/Tests/Section/TextRunTest.php | 0 {test => tests}/PhpWord/Tests/Section/TextTest.php | 0 {test => tests}/PhpWord/Tests/Section/TitleTest.php | 0 {test => tests}/PhpWord/Tests/SectionTest.php | 0 {test => tests}/PhpWord/Tests/SettingsTest.php | 0 .../PhpWord/Tests/Shared/DrawingTest.php | 0 {test => tests}/PhpWord/Tests/Shared/FileTest.php | 0 {test => tests}/PhpWord/Tests/Shared/FontTest.php | 0 {test => tests}/PhpWord/Tests/Shared/StringTest.php | 0 {test => tests}/PhpWord/Tests/Style/CellTest.php | 0 {test => tests}/PhpWord/Tests/Style/FontTest.php | 0 {test => tests}/PhpWord/Tests/Style/ImageTest.php | 0 .../PhpWord/Tests/Style/ListItemTest.php | 0 .../PhpWord/Tests/Style/ParagraphTest.php | 0 {test => tests}/PhpWord/Tests/Style/RowTest.php | 0 {test => tests}/PhpWord/Tests/Style/TOCTest.php | 0 .../PhpWord/Tests/Style/TableFullTest.php | 0 {test => tests}/PhpWord/Tests/Style/TableTest.php | 0 {test => tests}/PhpWord/Tests/Style/TabsTest.php | 0 {test => tests}/PhpWord/Tests/StyleTest.php | 0 {test => tests}/PhpWord/Tests/TOCTest.php | 0 {test => tests}/PhpWord/Tests/TemplateTest.php | 0 .../PhpWord/Tests/Writer/ODText/ContentTest.php | 0 .../PhpWord/Tests/Writer/ODText/WriterPartTest.php | 0 {test => tests}/PhpWord/Tests/Writer/ODTextTest.php | 0 {test => tests}/PhpWord/Tests/Writer/RTFTest.php | 0 .../PhpWord/Tests/Writer/Word2007/BaseTest.php | 0 .../PhpWord/Tests/Writer/Word2007/DocumentTest.php | 0 .../PhpWord/Tests/Writer/Word2007/FooterTest.php | 0 .../PhpWord/Tests/Writer/Word2007/FootnotesTest.php | 0 .../PhpWord/Tests/Writer/Word2007/HeaderTest.php | 0 .../PhpWord/Tests/Writer/Word2007/StylesTest.php | 0 .../Tests/Writer/Word2007/WriterPartTest.php | 0 .../PhpWord/Tests/Writer/Word2007Test.php | 0 .../PhpWord/Tests/_files/documents/reader.docx | Bin .../PhpWord/Tests/_files/documents/reader.docx.zip | Bin .../PhpWord/Tests/_files/documents/sheet.xls | Bin .../_files/documents/without_table_macros.docx | Bin .../PhpWord/Tests/_files/images/PhpWord.png | Bin .../PhpWord/Tests/_files/images/alexz-johnson.pcx | Bin .../PhpWord/Tests/_files/images/angela_merkel.tif | Bin .../PhpWord/Tests/_files/images/duke_nukem.bmp | Bin .../PhpWord/Tests/_files/images/earth.jpg | Bin .../PhpWord/Tests/_files/images/firefox.png | Bin .../PhpWord/Tests/_files/images/mario.gif | Bin .../PhpWord/Tests/_files/images/mars.jpg | Bin .../PhpWord/Tests/_files/images/mars_noext_jpg | Bin .../PhpWord/Tests/_files/templates/blank.docx | Bin .../PhpWord/Tests/_files/templates/clone-merge.docx | Bin .../templates/corrupted_main_document_part.docx | Bin .../Tests/_files/templates/with_table_macros.docx | Bin .../PhpWord/Tests/_files/xsl/passthrough.xsl | 0 .../Tests/_files/xsl/remove_tables_by_needle.xsl | 0 .../PhpWord/Tests/_includes/TestHelperDOCX.php | 0 .../PhpWord/Tests/_includes/XmlDocument.php | 0 {test => tests}/bootstrap.php | 0 82 files changed, 2 insertions(+), 2 deletions(-) rename {test => tests}/PhpWord/Tests/AutoloaderTest.php (100%) rename {test => tests}/PhpWord/Tests/DocumentPropertiesTest.php (100%) rename {test => tests}/PhpWord/Tests/Exceptions/ExceptionTest.php (100%) rename {test => tests}/PhpWord/Tests/Exceptions/InvalidImageExceptionTest.php (100%) rename {test => tests}/PhpWord/Tests/Exceptions/InvalidStyleExceptionTest.php (100%) rename {test => tests}/PhpWord/Tests/Exceptions/UnsupportedImageTypeExceptionTest.php (100%) rename {test => tests}/PhpWord/Tests/IOFactoryTest.php (100%) rename {test => tests}/PhpWord/Tests/MediaTest.php (100%) rename {test => tests}/PhpWord/Tests/PhpWordTest.php (100%) rename {test => tests}/PhpWord/Tests/Reader/Word2007Test.php (100%) rename {test => tests}/PhpWord/Tests/Section/Footer/PreserveTextTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/FooterTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/FootnoteTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/HeaderTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/ImageTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/LinkTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/ListItemTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/MemoryImageTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/ObjectTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/PageBreakTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/SettingsTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/Table/CellTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/Table/RowTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/TableTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/TextBreakTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/TextRunTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/TextTest.php (100%) rename {test => tests}/PhpWord/Tests/Section/TitleTest.php (100%) rename {test => tests}/PhpWord/Tests/SectionTest.php (100%) rename {test => tests}/PhpWord/Tests/SettingsTest.php (100%) rename {test => tests}/PhpWord/Tests/Shared/DrawingTest.php (100%) rename {test => tests}/PhpWord/Tests/Shared/FileTest.php (100%) rename {test => tests}/PhpWord/Tests/Shared/FontTest.php (100%) rename {test => tests}/PhpWord/Tests/Shared/StringTest.php (100%) rename {test => tests}/PhpWord/Tests/Style/CellTest.php (100%) rename {test => tests}/PhpWord/Tests/Style/FontTest.php (100%) rename {test => tests}/PhpWord/Tests/Style/ImageTest.php (100%) rename {test => tests}/PhpWord/Tests/Style/ListItemTest.php (100%) rename {test => tests}/PhpWord/Tests/Style/ParagraphTest.php (100%) rename {test => tests}/PhpWord/Tests/Style/RowTest.php (100%) rename {test => tests}/PhpWord/Tests/Style/TOCTest.php (100%) rename {test => tests}/PhpWord/Tests/Style/TableFullTest.php (100%) rename {test => tests}/PhpWord/Tests/Style/TableTest.php (100%) rename {test => tests}/PhpWord/Tests/Style/TabsTest.php (100%) rename {test => tests}/PhpWord/Tests/StyleTest.php (100%) rename {test => tests}/PhpWord/Tests/TOCTest.php (100%) rename {test => tests}/PhpWord/Tests/TemplateTest.php (100%) rename {test => tests}/PhpWord/Tests/Writer/ODText/ContentTest.php (100%) rename {test => tests}/PhpWord/Tests/Writer/ODText/WriterPartTest.php (100%) rename {test => tests}/PhpWord/Tests/Writer/ODTextTest.php (100%) rename {test => tests}/PhpWord/Tests/Writer/RTFTest.php (100%) rename {test => tests}/PhpWord/Tests/Writer/Word2007/BaseTest.php (100%) rename {test => tests}/PhpWord/Tests/Writer/Word2007/DocumentTest.php (100%) rename {test => tests}/PhpWord/Tests/Writer/Word2007/FooterTest.php (100%) rename {test => tests}/PhpWord/Tests/Writer/Word2007/FootnotesTest.php (100%) rename {test => tests}/PhpWord/Tests/Writer/Word2007/HeaderTest.php (100%) rename {test => tests}/PhpWord/Tests/Writer/Word2007/StylesTest.php (100%) rename {test => tests}/PhpWord/Tests/Writer/Word2007/WriterPartTest.php (100%) rename {test => tests}/PhpWord/Tests/Writer/Word2007Test.php (100%) rename {test => tests}/PhpWord/Tests/_files/documents/reader.docx (100%) rename {test => tests}/PhpWord/Tests/_files/documents/reader.docx.zip (100%) rename {test => tests}/PhpWord/Tests/_files/documents/sheet.xls (100%) rename {test => tests}/PhpWord/Tests/_files/documents/without_table_macros.docx (100%) rename {test => tests}/PhpWord/Tests/_files/images/PhpWord.png (100%) rename {test => tests}/PhpWord/Tests/_files/images/alexz-johnson.pcx (100%) rename {test => tests}/PhpWord/Tests/_files/images/angela_merkel.tif (100%) rename {test => tests}/PhpWord/Tests/_files/images/duke_nukem.bmp (100%) rename {test => tests}/PhpWord/Tests/_files/images/earth.jpg (100%) rename {test => tests}/PhpWord/Tests/_files/images/firefox.png (100%) rename {test => tests}/PhpWord/Tests/_files/images/mario.gif (100%) rename {test => tests}/PhpWord/Tests/_files/images/mars.jpg (100%) rename {test => tests}/PhpWord/Tests/_files/images/mars_noext_jpg (100%) rename {test => tests}/PhpWord/Tests/_files/templates/blank.docx (100%) rename {test => tests}/PhpWord/Tests/_files/templates/clone-merge.docx (100%) rename {test => tests}/PhpWord/Tests/_files/templates/corrupted_main_document_part.docx (100%) rename {test => tests}/PhpWord/Tests/_files/templates/with_table_macros.docx (100%) rename {test => tests}/PhpWord/Tests/_files/xsl/passthrough.xsl (100%) rename {test => tests}/PhpWord/Tests/_files/xsl/remove_tables_by_needle.xsl (100%) rename {test => tests}/PhpWord/Tests/_includes/TestHelperDOCX.php (100%) rename {test => tests}/PhpWord/Tests/_includes/XmlDocument.php (100%) rename {test => tests}/bootstrap.php (100%) 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/test/PhpWord/Tests/Section/MemoryImageTest.php b/tests/PhpWord/Tests/Section/MemoryImageTest.php similarity index 100% rename from test/PhpWord/Tests/Section/MemoryImageTest.php rename to tests/PhpWord/Tests/Section/MemoryImageTest.php 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/test/PhpWord/Tests/Style/TableFullTest.php b/tests/PhpWord/Tests/Style/TableFullTest.php similarity index 100% rename from test/PhpWord/Tests/Style/TableFullTest.php rename to tests/PhpWord/Tests/Style/TableFullTest.php 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 100% rename from test/PhpWord/Tests/TemplateTest.php rename to tests/PhpWord/Tests/TemplateTest.php 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 From 57ff17ed0451af7c1c5395488faf21158a2eb047 Mon Sep 17 00:00:00 2001 From: Gabriel Bull Date: Mon, 24 Mar 2014 08:31:58 -0400 Subject: [PATCH 6/8] Changed test directory in travis config --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From e6466f0ee5e14250ee59eeafed0c07e79a325dec Mon Sep 17 00:00:00 2001 From: Gabriel Bull Date: Mon, 24 Mar 2014 08:40:42 -0400 Subject: [PATCH 7/8] Changed travis branch in read me to master --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a36664a..d796dba3 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ![PHPWord](https://raw.githubusercontent.com/PHPOffice/PHPWord/develop/docs/images/phpword.svg "PHPWord") -[![Build Status](https://travis-ci.org/PHPOffice/PHPWord.svg?branch=develop)](https://travis-ci.org/PHPOffice/PHPWord) +[![Build Status](https://travis-ci.org/PHPOffice/PHPWord.svg?branch=master)](https://travis-ci.org/PHPOffice/PHPWord) [![Latest Stable Version](https://poser.pugx.org/phpoffice/phpword/v/stable.png)](https://packagist.org/packages/phpoffice/phpword) [![Total Downloads](https://poser.pugx.org/phpoffice/phpword/downloads.png)](https://packagist.org/packages/phpoffice/phpword) [![Latest Unstable Version](https://poser.pugx.org/phpoffice/phpword/v/unstable.png)](https://packagist.org/packages/phpoffice/phpword) From ecdaeefab8b07270e8b0b3a52e73658cdd7d5f75 Mon Sep 17 00:00:00 2001 From: Ivan Lanin Date: Mon, 24 Mar 2014 20:59:42 +0700 Subject: [PATCH 8/8] More unit tests --- tests/PhpWord/Tests/TemplateTest.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/PhpWord/Tests/TemplateTest.php b/tests/PhpWord/Tests/TemplateTest.php index f096e69d..c36ef408 100644 --- a/tests/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);