Skip to content

Commit 3519477

Browse files
committed
Removed fake namespace from tests class names because we use real namespacing
1 parent 7abd5be commit 3519477

File tree

13 files changed

+48
-32
lines changed

13 files changed

+48
-32
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
}

Tests/PHPWord/IOFactoryTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
use PHPWord;
66
use PHPWord_IOFactory;
77
use PHPWord_Writer_Word2007;
8+
use Exception;
89

910
/**
10-
* Class PHPWord_IOFactoryTest
11+
* Class IOFactoryTest
1112
* @package PHPWord\Tests
1213
* @runTestsInSeparateProcesses
1314
*/
14-
class PHPWord_IOFactoryTest extends \PHPUnit_Framework_TestCase
15+
class IOFactoryTest extends \PHPUnit_Framework_TestCase
1516
{
1617
public function testGetSearchLocations()
1718
{
@@ -25,7 +26,7 @@ public function testSetSearchLocationsWithArray()
2526
}
2627

2728
/**
28-
* @expectedException Exception
29+
* @expectedException Exception
2930
* @expectedExceptionMessage Invalid parameter passed.
3031
*/
3132
public function testSetSearchLocationsWithNotArray()
@@ -41,7 +42,7 @@ public function testAddSearchLocation()
4142
}
4243

4344
/**
44-
* @expectedException Exception
45+
* @expectedException Exception
4546
* @expectedExceptionMessage No IWriter found for type
4647
*/
4748
public function testCreateWriterException()

Tests/PHPWord/MediaTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use PHPUnit_Framework_TestCase;
55
use PHPWord_Media;
66

7-
class PHPWord_MediaTest extends \PHPUnit_Framework_TestCase
7+
class MediaTest extends \PHPUnit_Framework_TestCase
88
{
99
public function testGetSectionMediaElementsWithNull()
1010
{

Tests/PHPWord/SectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use PHPUnit_Framework_TestCase;
55
use PHPWord_Section;
66

7-
class PHPWord_SectionTest extends \PHPUnit_Framework_TestCase
7+
class SectionTest extends \PHPUnit_Framework_TestCase
88
{
99
public function testGetSettings()
1010
{

Tests/PHPWord/Shared/FontTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?php
2-
namespace PHPWord\Tests;
2+
namespace PHPWord\Tests\Shared;
33

44
use PHPUnit_Framework_TestCase;
55
use PHPWord;
66
use PHPWord_Shared_Font;
77

88
/**
9-
* Class PHPWord_Writer_Shared_FontTest
9+
* Class FontTest
1010
*
1111
* @package PHPWord\Tests
1212
* @runTestsInSeparateProcesses
1313
*/
14-
class PHPWord_Writer_Shared_FontTest extends \PHPUnit_Framework_TestCase
14+
class FontTest extends \PHPUnit_Framework_TestCase
1515
{
1616
/**
1717
* Test various conversions

Tests/PHPWord/Style/CellTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?php
2-
namespace PHPWord\Tests;
2+
namespace PHPWord\Tests\Style;
33

44
use PHPUnit_Framework_TestCase;
55
use PHPWord_Style_Cell;
66

77
/**
8-
* Class PHPWord_Style_CellTest
8+
* Class CellTest
99
*
1010
* @package PHPWord\Tests
1111
* @runTestsInSeparateProcesses
1212
*/
13-
class PHPWord_Style_CellTest extends \PHPUnit_Framework_TestCase
13+
class CellTest extends \PHPUnit_Framework_TestCase
1414
{
1515
/**
1616
* Test setting style with normal value

Tests/PHPWord/Style/FontTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?php
2-
namespace PHPWord\Tests;
2+
namespace PHPWord\Tests\Style;
33

44
use PHPUnit_Framework_TestCase;
55
use PHPWord;
66
use PHPWord_Style_Font;
77

88
/**
9-
* Class PHPWord_Style_FontTest
9+
* Class FontTest
1010
*
1111
* @package PHPWord\Tests
1212
* @runTestsInSeparateProcesses
1313
*/
14-
class PHPWord_Style_FontTest extends \PHPUnit_Framework_TestCase
14+
class FontTest extends \PHPUnit_Framework_TestCase
1515
{
1616
/**
1717
* Test initiation for style type and paragraph style

Tests/PHPWord/Style/ParagraphTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?php
2-
namespace PHPWord\Tests;
2+
namespace PHPWord\Tests\Style;
33

44
use PHPUnit_Framework_TestCase;
55
use PHPWord_Style_Paragraph;
66
use PHPWord_Style_Tab;
77

88
/**
9-
* Class PHPWord_Style_ParagraphTest
9+
* Class ParagraphTest
1010
*
1111
* @package PHPWord\Tests
1212
* @runTestsInSeparateProcesses
1313
*/
14-
class PHPWord_Style_ParagraphTest extends \PHPUnit_Framework_TestCase
14+
class ParagraphTest extends \PHPUnit_Framework_TestCase
1515
{
1616
/**
1717
* Test setting style values with null or empty value

Tests/PHPWord/TemplateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/**
77
* @coversDefaultClass PHPWord_Template
88
*/
9-
class PHPWord_TemplateTest extends \PHPUnit_Framework_TestCase
9+
class TemplateTest extends \PHPUnit_Framework_TestCase
1010
{
1111
/**
1212
* @covers ::applyXslStyleSheet

Tests/PHPWord/Writer/Word2007/BaseTest.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
<?php
2-
namespace PHPWord\Tests;
2+
namespace PHPWord\Tests\Writer\Word2007;
33

44
use PHPUnit_Framework_TestCase;
55
use PHPWord;
6-
use PHPWord_Writer_Word2007;
7-
use PHPWord_Writer_Word2007_Base;
6+
use PHPWord\Tests\TestHelperDOCX;
87

98
/**
10-
* Class PHPWord_Writer_Word2007_BaseTest
9+
* Class BaseTest
1110
* @package PHPWord\Tests
1211
* @runTestsInSeparateProcesses
1312
*/
14-
class PHPWord_Writer_Word2007_BaseTest extends \PHPUnit_Framework_TestCase
13+
class BaseTest extends \PHPUnit_Framework_TestCase
1514
{
1615
/**
1716
* Executed before each method of the class
@@ -109,4 +108,4 @@ public function testWriteParagraphStyle_Pagination()
109108
$this->assertEquals($expected, $element->getAttribute('w:val'));
110109
}
111110
}
112-
}
111+
}

0 commit comments

Comments
 (0)