File tree Expand file tree Collapse file tree 13 files changed +48
-32
lines changed
Classes/PHPWord/Exceptions Expand file tree Collapse file tree 13 files changed +48
-32
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ namespace PHPWord \Exceptions ;
3
+
4
+ use InvalidArgumentException ;
5
+
6
+ /**
7
+ * InvalidStyleException
8
+ *
9
+ * Exception used for when a style value is invalid
10
+ *
11
+ * @package PHPWord
12
+ */
13
+ class InvalidStyleException extends InvalidArgumentException
14
+ {
15
+ }
Original file line number Diff line number Diff line change 5
5
use PHPWord ;
6
6
use PHPWord_IOFactory ;
7
7
use PHPWord_Writer_Word2007 ;
8
+ use Exception ;
8
9
9
10
/**
10
- * Class PHPWord_IOFactoryTest
11
+ * Class IOFactoryTest
11
12
* @package PHPWord\Tests
12
13
* @runTestsInSeparateProcesses
13
14
*/
14
- class PHPWord_IOFactoryTest extends \PHPUnit_Framework_TestCase
15
+ class IOFactoryTest extends \PHPUnit_Framework_TestCase
15
16
{
16
17
public function testGetSearchLocations ()
17
18
{
@@ -25,7 +26,7 @@ public function testSetSearchLocationsWithArray()
25
26
}
26
27
27
28
/**
28
- * @expectedException Exception
29
+ * @expectedException Exception
29
30
* @expectedExceptionMessage Invalid parameter passed.
30
31
*/
31
32
public function testSetSearchLocationsWithNotArray ()
@@ -41,7 +42,7 @@ public function testAddSearchLocation()
41
42
}
42
43
43
44
/**
44
- * @expectedException Exception
45
+ * @expectedException Exception
45
46
* @expectedExceptionMessage No IWriter found for type
46
47
*/
47
48
public function testCreateWriterException ()
Original file line number Diff line number Diff line change 4
4
use PHPUnit_Framework_TestCase ;
5
5
use PHPWord_Media ;
6
6
7
- class PHPWord_MediaTest extends \PHPUnit_Framework_TestCase
7
+ class MediaTest extends \PHPUnit_Framework_TestCase
8
8
{
9
9
public function testGetSectionMediaElementsWithNull ()
10
10
{
Original file line number Diff line number Diff line change 4
4
use PHPUnit_Framework_TestCase ;
5
5
use PHPWord_Section ;
6
6
7
- class PHPWord_SectionTest extends \PHPUnit_Framework_TestCase
7
+ class SectionTest extends \PHPUnit_Framework_TestCase
8
8
{
9
9
public function testGetSettings ()
10
10
{
Original file line number Diff line number Diff line change 1
1
<?php
2
- namespace PHPWord \Tests ;
2
+ namespace PHPWord \Tests \ Shared ;
3
3
4
4
use PHPUnit_Framework_TestCase ;
5
5
use PHPWord ;
6
6
use PHPWord_Shared_Font ;
7
7
8
8
/**
9
- * Class PHPWord_Writer_Shared_FontTest
9
+ * Class FontTest
10
10
*
11
11
* @package PHPWord\Tests
12
12
* @runTestsInSeparateProcesses
13
13
*/
14
- class PHPWord_Writer_Shared_FontTest extends \PHPUnit_Framework_TestCase
14
+ class FontTest extends \PHPUnit_Framework_TestCase
15
15
{
16
16
/**
17
17
* Test various conversions
Original file line number Diff line number Diff line change 1
1
<?php
2
- namespace PHPWord \Tests ;
2
+ namespace PHPWord \Tests \ Style ;
3
3
4
4
use PHPUnit_Framework_TestCase ;
5
5
use PHPWord_Style_Cell ;
6
6
7
7
/**
8
- * Class PHPWord_Style_CellTest
8
+ * Class CellTest
9
9
*
10
10
* @package PHPWord\Tests
11
11
* @runTestsInSeparateProcesses
12
12
*/
13
- class PHPWord_Style_CellTest extends \PHPUnit_Framework_TestCase
13
+ class CellTest extends \PHPUnit_Framework_TestCase
14
14
{
15
15
/**
16
16
* Test setting style with normal value
Original file line number Diff line number Diff line change 1
1
<?php
2
- namespace PHPWord \Tests ;
2
+ namespace PHPWord \Tests \ Style ;
3
3
4
4
use PHPUnit_Framework_TestCase ;
5
5
use PHPWord ;
6
6
use PHPWord_Style_Font ;
7
7
8
8
/**
9
- * Class PHPWord_Style_FontTest
9
+ * Class FontTest
10
10
*
11
11
* @package PHPWord\Tests
12
12
* @runTestsInSeparateProcesses
13
13
*/
14
- class PHPWord_Style_FontTest extends \PHPUnit_Framework_TestCase
14
+ class FontTest extends \PHPUnit_Framework_TestCase
15
15
{
16
16
/**
17
17
* Test initiation for style type and paragraph style
Original file line number Diff line number Diff line change 1
1
<?php
2
- namespace PHPWord \Tests ;
2
+ namespace PHPWord \Tests \ Style ;
3
3
4
4
use PHPUnit_Framework_TestCase ;
5
5
use PHPWord_Style_Paragraph ;
6
6
use PHPWord_Style_Tab ;
7
7
8
8
/**
9
- * Class PHPWord_Style_ParagraphTest
9
+ * Class ParagraphTest
10
10
*
11
11
* @package PHPWord\Tests
12
12
* @runTestsInSeparateProcesses
13
13
*/
14
- class PHPWord_Style_ParagraphTest extends \PHPUnit_Framework_TestCase
14
+ class ParagraphTest extends \PHPUnit_Framework_TestCase
15
15
{
16
16
/**
17
17
* Test setting style values with null or empty value
Original file line number Diff line number Diff line change 6
6
/**
7
7
* @coversDefaultClass PHPWord_Template
8
8
*/
9
- class PHPWord_TemplateTest extends \PHPUnit_Framework_TestCase
9
+ class TemplateTest extends \PHPUnit_Framework_TestCase
10
10
{
11
11
/**
12
12
* @covers ::applyXslStyleSheet
Original file line number Diff line number Diff line change 1
1
<?php
2
- namespace PHPWord \Tests ;
2
+ namespace PHPWord \Tests \ Writer \ Word2007 ;
3
3
4
4
use PHPUnit_Framework_TestCase ;
5
5
use PHPWord ;
6
- use PHPWord_Writer_Word2007 ;
7
- use PHPWord_Writer_Word2007_Base ;
6
+ use PHPWord \Tests \TestHelperDOCX ;
8
7
9
8
/**
10
- * Class PHPWord_Writer_Word2007_BaseTest
9
+ * Class BaseTest
11
10
* @package PHPWord\Tests
12
11
* @runTestsInSeparateProcesses
13
12
*/
14
- class PHPWord_Writer_Word2007_BaseTest extends \PHPUnit_Framework_TestCase
13
+ class BaseTest extends \PHPUnit_Framework_TestCase
15
14
{
16
15
/**
17
16
* Executed before each method of the class
@@ -109,4 +108,4 @@ public function testWriteParagraphStyle_Pagination()
109
108
$ this ->assertEquals ($ expected , $ element ->getAttribute ('w:val ' ));
110
109
}
111
110
}
112
- }
111
+ }
You can’t perform that action at this time.
0 commit comments