Changed tests namespace to reflect the namespace of the source code

This commit is contained in:
Gabriel Bull 2014-03-23 11:59:22 -04:00
parent e893b351fa
commit a7444cb482
75 changed files with 73 additions and 63 deletions

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests;
namespace PhpOffice\PhpWord\Tests;
use PhpOffice\PhpWord\Autoloader;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests;
namespace PhpOffice\PhpWord\Tests;
use PhpOffice\PhpWord\DocumentProperties;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Exceptions;
namespace PhpOffice\PhpWord\Tests\Exceptions;
use PhpOffice\PhpWord\Exceptions\Exception;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Exceptions;
namespace PhpOffice\PhpWord\Tests\Exceptions;
use PhpOffice\PhpWord\Exceptions\InvalidImageException;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Exceptions;
namespace PhpOffice\PhpWord\Tests\Exceptions;
use PhpOffice\PhpWord\Exceptions\InvalidStyleException;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Exceptions;
namespace PhpOffice\PhpWord\Tests\Exceptions;
use PhpOffice\PhpWord\Exceptions\UnsupportedImageTypeException;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests;
namespace PhpOffice\PhpWord\Tests;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\IOFactory;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests;
namespace PhpOffice\PhpWord\Tests;
use PhpOffice\PhpWord\Media;
use PhpOffice\PhpWord\Section;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests;
namespace PhpOffice\PhpWord\Tests;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\DocumentProperties;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Reader;
namespace PhpOffice\PhpWord\Tests\Reader;
use PhpOffice\PhpWord\Reader\Word2007;
use PhpOffice\PhpWord\IOFactory;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section\Footer;
namespace PhpOffice\PhpWord\Tests\Section\Footer;
use PhpOffice\PhpWord\Section\Footer\PreserveText;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section;
namespace PhpOffice\PhpWord\Tests\Section;
use PhpOffice\PhpWord\Section\Footer;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section;
namespace PhpOffice\PhpWord\Tests\Section;
use PhpOffice\PhpWord\Section\Footnote;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section;
namespace PhpOffice\PhpWord\Tests\Section;
use PhpOffice\PhpWord\Section\Header;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section;
namespace PhpOffice\PhpWord\Tests\Section;
use PhpOffice\PhpWord\Section\Image;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section;
namespace PhpOffice\PhpWord\Tests\Section;
use PhpOffice\PhpWord\Section\Link;
use PhpOffice\PhpWord\Style\Font;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section;
namespace PhpOffice\PhpWord\Tests\Section;
use PhpOffice\PhpWord\Section\ListItem;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section;
namespace PhpOffice\PhpWord\Tests\Section;
use PhpOffice\PhpWord\Section\MemoryImage;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section;
namespace PhpOffice\PhpWord\Tests\Section;
use PhpOffice\PhpWord\Section\Object;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section;
namespace PhpOffice\PhpWord\Tests\Section;
use PhpOffice\PhpWord\Section\PageBreak;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section;
namespace PhpOffice\PhpWord\Tests\Section;
use PhpOffice\PhpWord\Section\Settings;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section\Table;
namespace PhpOffice\PhpWord\Tests\Section\Table;
use PhpOffice\PhpWord\Section\Table\Cell;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section\Table;
namespace PhpOffice\PhpWord\Tests\Section\Table;
use PhpOffice\PhpWord\Section\Table\Row;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section;
namespace PhpOffice\PhpWord\Tests\Section;
use PhpOffice\PhpWord\Section\Table;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section;
namespace PhpOffice\PhpWord\Tests\Section;
use PhpOffice\PhpWord\Section\TextBreak;
use PhpOffice\PhpWord\Style\Font;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section;
namespace PhpOffice\PhpWord\Tests\Section;
use PhpOffice\PhpWord\Section\TextRun;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section;
namespace PhpOffice\PhpWord\Tests\Section;
use PhpOffice\PhpWord\Section\Text;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Section;
namespace PhpOffice\PhpWord\Tests\Section;
use PhpOffice\PhpWord\Section\Title;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests;
namespace PhpOffice\PhpWord\Tests;
use PhpOffice\PhpWord\Section;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests;
namespace PhpOffice\PhpWord\Tests;
use PhpOffice\PhpWord\Settings;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Shared;
namespace PhpOffice\PhpWord\Tests\Shared;
use PhpOffice\PhpWord\Shared\Drawing;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Shared;
namespace PhpOffice\PhpWord\Tests\Shared;
use PhpOffice\PhpWord\Shared\File;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Shared;
namespace PhpOffice\PhpWord\Tests\Shared;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Shared\Font;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Shared;
namespace PhpOffice\PhpWord\Tests\Shared;
use PhpOffice\PhpWord\Shared\String;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Style;
namespace PhpOffice\PhpWord\Tests\Style;
use PhpOffice\PhpWord\Style\Cell;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Style;
namespace PhpOffice\PhpWord\Tests\Style;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Style\Font;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Style;
namespace PhpOffice\PhpWord\Tests\Style;
use PhpOffice\PhpWord\Style\Image;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Style;
namespace PhpOffice\PhpWord\Tests\Style;
use PhpOffice\PhpWord\Style\ListItem;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Style;
namespace PhpOffice\PhpWord\Tests\Style;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Style\Paragraph;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Style;
namespace PhpOffice\PhpWord\Tests\Style;
use PhpOffice\PhpWord\Style\Row;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Style;
namespace PhpOffice\PhpWord\Tests\Style;
use PhpOffice\PhpWord\Style\TOC;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Style;
namespace PhpOffice\PhpWord\Tests\Style;
use PhpOffice\PhpWord\Style\TableFull;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Style;
namespace PhpOffice\PhpWord\Tests\Style;
use PhpOffice\PhpWord\Style\Table;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Style;
namespace PhpOffice\PhpWord\Tests\Style;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Style\Tab;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests;
namespace PhpOffice\PhpWord\Tests;
use PhpOffice\PhpWord\Style;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests;
namespace PhpOffice\PhpWord\Tests;
use PhpOffice\PhpWord\TOC;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests;
namespace PhpOffice\PhpWord\Tests;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Template;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Writer\ODText;
namespace PhpOffice\PhpWord\Tests\Writer\ODText;
use PhpOffice\PhpWord\PhpWord;
use PhpWord\Tests\TestHelperDOCX;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Writer\ODText;
namespace PhpOffice\PhpWord\Tests\Writer\ODText;
use PhpOffice\PhpWord\Writer\ODText;
use PhpWord\Tests\TestHelperDOCX;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Writer;
namespace PhpOffice\PhpWord\Tests\Writer;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Writer\ODText;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Writer;
namespace PhpOffice\PhpWord\Tests\Writer;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Writer\RTF;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Writer\Word2007;
namespace PhpOffice\PhpWord\Tests\Writer\Word2007;
use PhpOffice\PhpWord\PhpWord;
use PhpWord\Tests\TestHelperDOCX;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Writer\Word2007;
namespace PhpOffice\PhpWord\Tests\Writer\Word2007;
use PhpOffice\PhpWord\PhpWord;
use PhpWord\Tests\TestHelperDOCX;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Writer\Word2007;
namespace PhpOffice\PhpWord\Tests\Writer\Word2007;
use PhpOffice\PhpWord\Writer\Word2007\Footer;
use PhpOffice\PhpWord\Writer\Word2007;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Writer\Word2007;
namespace PhpOffice\PhpWord\Tests\Writer\Word2007;
use PhpOffice\PhpWord\PhpWord;
use PhpWord\Tests\TestHelperDOCX;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Writer\Word2007;
namespace PhpOffice\PhpWord\Tests\Writer\Word2007;
use PhpOffice\PhpWord\Writer\Word2007\Header;
use PhpOffice\PhpWord\Writer\Word2007;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Writer\Word2007;
namespace PhpOffice\PhpWord\Tests\Writer\Word2007;
use PhpOffice\PhpWord\PhpWord;
use PhpWord\Tests\TestHelperDOCX;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Writer\Word2007;
namespace PhpOffice\PhpWord\Tests\Writer\Word2007;
use PhpOffice\PhpWord\Writer\Word2007\WriterPart;
use PhpOffice\PhpWord\Writer\Word2007;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests\Writer;
namespace PhpOffice\PhpWord\Tests\Writer;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Writer\Word2007;

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

Before

Width:  |  Height:  |  Size: 952 KiB

After

Width:  |  Height:  |  Size: 952 KiB

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests;
namespace PhpOffice\PhpWord\Tests;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\IOFactory;

View File

@ -1,5 +1,5 @@
<?php
namespace PhpWord\Tests;
namespace PhpOffice\PhpWord\Tests;
class XmlDocument
{

View File

@ -10,5 +10,15 @@ if (!\defined('PHPWORD_TESTS_BASE_DIR')) {
require_once __DIR__ . '/../../src/PhpWord/Autoloader.php';
\PhpOffice\PhpWord\Autoloader::register();
require_once __DIR__ . '/TestHelperDOCX.php';
require_once __DIR__ . '/XmlDocument.php';
spl_autoload_register(function ($class) {
$class = ltrim($class, '\\');
$prefix = 'PhpOffice\\PhpWord\\Tests';
if (strpos($class, $prefix) === 0) {
$class = str_replace('\\', DIRECTORY_SEPARATOR, $class);
$class = 'PhpWord' . DIRECTORY_SEPARATOR . 'Tests' . DIRECTORY_SEPARATOR . '_includes' . substr($class, strlen($prefix));
$file = __DIR__ . DIRECTORY_SEPARATOR . $class . '.php';
if (file_exists($file)) {
require_once $file;
}
}
});