Reformatted Tests to PSR-2 coding standards
This commit is contained in:
parent
63a535bf1a
commit
7abd5be62b
@ -30,7 +30,6 @@
|
|||||||
*/
|
*/
|
||||||
class PHPWord_Style_Font
|
class PHPWord_Style_Font
|
||||||
{
|
{
|
||||||
|
|
||||||
const UNDERLINE_NONE = 'none';
|
const UNDERLINE_NONE = 'none';
|
||||||
const UNDERLINE_DASH = 'dash';
|
const UNDERLINE_DASH = 'dash';
|
||||||
const UNDERLINE_DASHHEAVY = 'dashHeavy';
|
const UNDERLINE_DASHHEAVY = 'dashHeavy';
|
||||||
|
|||||||
@ -11,7 +11,8 @@ use PHPWord_Writer_Word2007;
|
|||||||
* @package PHPWord\Tests
|
* @package PHPWord\Tests
|
||||||
* @runTestsInSeparateProcesses
|
* @runTestsInSeparateProcesses
|
||||||
*/
|
*/
|
||||||
class PHPWord_IOFactoryTest extends \PHPUnit_Framework_TestCase {
|
class PHPWord_IOFactoryTest extends \PHPUnit_Framework_TestCase
|
||||||
|
{
|
||||||
public function testGetSearchLocations()
|
public function testGetSearchLocations()
|
||||||
{
|
{
|
||||||
$this->assertAttributeEquals(PHPWord_IOFactory::getSearchLocations(), '_searchLocations', 'PHPWord_IOFactory');
|
$this->assertAttributeEquals(PHPWord_IOFactory::getSearchLocations(), '_searchLocations', 'PHPWord_IOFactory');
|
||||||
@ -43,17 +44,18 @@ class PHPWord_IOFactoryTest extends \PHPUnit_Framework_TestCase {
|
|||||||
* @expectedException Exception
|
* @expectedException Exception
|
||||||
* @expectedExceptionMessage No IWriter found for type
|
* @expectedExceptionMessage No IWriter found for type
|
||||||
*/
|
*/
|
||||||
public function testCreateWriterException(){
|
public function testCreateWriterException()
|
||||||
|
{
|
||||||
$oPHPWord = new PHPWord();
|
$oPHPWord = new PHPWord();
|
||||||
|
|
||||||
PHPWord_IOFactory::setSearchLocations(array());
|
PHPWord_IOFactory::setSearchLocations(array());
|
||||||
PHPWord_IOFactory::createWriter($oPHPWord);
|
PHPWord_IOFactory::createWriter($oPHPWord);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testCreateWriter(){
|
public function testCreateWriter()
|
||||||
|
{
|
||||||
$oPHPWord = new PHPWord();
|
$oPHPWord = new PHPWord();
|
||||||
|
|
||||||
$this->assertEquals(PHPWord_IOFactory::createWriter($oPHPWord, 'Word2007'), new PHPWord_Writer_Word2007($oPHPWord));
|
$this->assertEquals(PHPWord_IOFactory::createWriter($oPHPWord, 'Word2007'), new PHPWord_Writer_Word2007($oPHPWord));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4,8 +4,8 @@ namespace PHPWord\Tests;
|
|||||||
use PHPUnit_Framework_TestCase;
|
use PHPUnit_Framework_TestCase;
|
||||||
use PHPWord_Media;
|
use PHPWord_Media;
|
||||||
|
|
||||||
class PHPWord_MediaTest extends \PHPUnit_Framework_TestCase {
|
class PHPWord_MediaTest extends \PHPUnit_Framework_TestCase
|
||||||
|
{
|
||||||
public function testGetSectionMediaElementsWithNull()
|
public function testGetSectionMediaElementsWithNull()
|
||||||
{
|
{
|
||||||
$this->assertEquals(PHPWord_Media::getSectionMediaElements(), array());
|
$this->assertEquals(PHPWord_Media::getSectionMediaElements(), array());
|
||||||
@ -26,4 +26,3 @@ class PHPWord_MediaTest extends \PHPUnit_Framework_TestCase {
|
|||||||
$this->assertAttributeEquals(PHPWord_Media::getFooterMediaElements(), '_footerMedia', 'PHPWord_Media');
|
$this->assertAttributeEquals(PHPWord_Media::getFooterMediaElements(), '_footerMedia', 'PHPWord_Media');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4,7 +4,8 @@ namespace PHPWord\Tests;
|
|||||||
use PHPUnit_Framework_TestCase;
|
use PHPUnit_Framework_TestCase;
|
||||||
use PHPWord_Section;
|
use PHPWord_Section;
|
||||||
|
|
||||||
class PHPWord_SectionTest extends \PHPUnit_Framework_TestCase {
|
class PHPWord_SectionTest extends \PHPUnit_Framework_TestCase
|
||||||
|
{
|
||||||
public function testGetSettings()
|
public function testGetSettings()
|
||||||
{
|
{
|
||||||
$oSection = new PHPWord_Section(0);
|
$oSection = new PHPWord_Section(0);
|
||||||
@ -35,4 +36,3 @@ class PHPWord_SectionTest extends \PHPUnit_Framework_TestCase {
|
|||||||
$this->assertAttributeEquals($oSection->getElements(), '_elementCollection', new PHPWord_Section(0));
|
$this->assertAttributeEquals($oSection->getElements(), '_elementCollection', new PHPWord_Section(0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -13,7 +13,6 @@ use PHPWord_Shared_Font;
|
|||||||
*/
|
*/
|
||||||
class PHPWord_Writer_Shared_FontTest extends \PHPUnit_Framework_TestCase
|
class PHPWord_Writer_Shared_FontTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test various conversions
|
* Test various conversions
|
||||||
*/
|
*/
|
||||||
@ -44,5 +43,4 @@ class PHPWord_Writer_Shared_FontTest extends \PHPUnit_Framework_TestCase
|
|||||||
$result = PHPWord_Shared_Font::pointSizeToTwips($original);
|
$result = PHPWord_Shared_Font::pointSizeToTwips($original);
|
||||||
$this->assertEquals($original * 20, $result);
|
$this->assertEquals($original * 20, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -12,7 +12,6 @@ use PHPWord_Style_Cell;
|
|||||||
*/
|
*/
|
||||||
class PHPWord_Style_CellTest extends \PHPUnit_Framework_TestCase
|
class PHPWord_Style_CellTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test setting style with normal value
|
* Test setting style with normal value
|
||||||
*/
|
*/
|
||||||
@ -76,5 +75,4 @@ class PHPWord_Style_CellTest extends \PHPUnit_Framework_TestCase
|
|||||||
$object->setStyleValue('_borderSize', $value);
|
$object->setStyleValue('_borderSize', $value);
|
||||||
$this->assertEquals($expected, $object->getBorderSize());
|
$this->assertEquals($expected, $object->getBorderSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -13,7 +13,6 @@ use PHPWord_Style_Font;
|
|||||||
*/
|
*/
|
||||||
class PHPWord_Style_FontTest extends \PHPUnit_Framework_TestCase
|
class PHPWord_Style_FontTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test initiation for style type and paragraph style
|
* Test initiation for style type and paragraph style
|
||||||
*/
|
*/
|
||||||
@ -78,5 +77,4 @@ class PHPWord_Style_FontTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals($value, $object->$get());
|
$this->assertEquals($value, $object->$get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -13,7 +13,6 @@ use PHPWord_Style_Tab;
|
|||||||
*/
|
*/
|
||||||
class PHPWord_Style_ParagraphTest extends \PHPUnit_Framework_TestCase
|
class PHPWord_Style_ParagraphTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test setting style values with null or empty value
|
* Test setting style values with null or empty value
|
||||||
*/
|
*/
|
||||||
@ -86,5 +85,4 @@ class PHPWord_Style_ParagraphTest extends \PHPUnit_Framework_TestCase
|
|||||||
));
|
));
|
||||||
$this->assertInstanceOf('PHPWord_Style_Tabs', $object->getTabs());
|
$this->assertInstanceOf('PHPWord_Style_Tabs', $object->getTabs());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -11,7 +11,8 @@ use PHPWord_Writer_Word2007_Base;
|
|||||||
* @package PHPWord\Tests
|
* @package PHPWord\Tests
|
||||||
* @runTestsInSeparateProcesses
|
* @runTestsInSeparateProcesses
|
||||||
*/
|
*/
|
||||||
class PHPWord_Writer_Word2007_BaseTest extends \PHPUnit_Framework_TestCase {
|
class PHPWord_Writer_Word2007_BaseTest extends \PHPUnit_Framework_TestCase
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Executed before each method of the class
|
* Executed before each method of the class
|
||||||
*/
|
*/
|
||||||
@ -108,5 +109,4 @@ class PHPWord_Writer_Word2007_BaseTest extends \PHPUnit_Framework_TestCase {
|
|||||||
$this->assertEquals($expected, $element->getAttribute('w:val'));
|
$this->assertEquals($expected, $element->getAttribute('w:val'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -11,7 +11,8 @@ use PHPWord_Writer_Word2007_Document;
|
|||||||
* @package PHPWord\Tests
|
* @package PHPWord\Tests
|
||||||
* @runTestsInSeparateProcesses
|
* @runTestsInSeparateProcesses
|
||||||
*/
|
*/
|
||||||
class PHPWord_Writer_Word2007_DocumentTest extends \PHPUnit_Framework_TestCase {
|
class PHPWord_Writer_Word2007_DocumentTest extends \PHPUnit_Framework_TestCase
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Executed before each method of the class
|
* Executed before each method of the class
|
||||||
*/
|
*/
|
||||||
@ -32,4 +33,3 @@ class PHPWord_Writer_Word2007_DocumentTest extends \PHPUnit_Framework_TestCase {
|
|||||||
$this->assertEquals(2, $element->getAttribute('w:start'));
|
$this->assertEquals(2, $element->getAttribute('w:start'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,5 +51,4 @@ class PHPWord_Writer_Word2007_StylesTest extends \PHPUnit_Framework_TestCase
|
|||||||
$element = $doc->getElement($path, $file);
|
$element = $doc->getElement($path, $file);
|
||||||
$this->assertEquals('Normal', $element->getAttribute('w:val'));
|
$this->assertEquals('Normal', $element->getAttribute('w:val'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user