Proposed simplified docblock
This commit is contained in:
parent
72bb688020
commit
a6568e988b
|
|
@ -2,25 +2,11 @@
|
||||||
/**
|
/**
|
||||||
* PHPWord
|
* PHPWord
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 PHPWord
|
* PHP version 5.3
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* @copyright 2014 PHPWord
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* License as published by the Free Software Foundation; either
|
* @version 0.9.0
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* @copyright Copyright (c) 2014 PHPWord
|
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
|
||||||
* @version 0.9.0
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace PhpOffice\PhpWord;
|
namespace PhpOffice\PhpWord;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* PHPWord
|
||||||
|
*
|
||||||
|
* PHP version 5.3
|
||||||
|
*
|
||||||
|
* @copyright 2014 PHPWord
|
||||||
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
|
* @version 0.9.0
|
||||||
|
*/
|
||||||
|
|
||||||
namespace PhpOffice\PhpWord\Tests;
|
namespace PhpOffice\PhpWord\Tests;
|
||||||
|
|
||||||
use PhpOffice\PhpWord\PhpWord;
|
use PhpOffice\PhpWord\PhpWord;
|
||||||
|
|
@ -7,13 +17,16 @@ use PhpOffice\PhpWord\Section;
|
||||||
use PhpOffice\PhpWord\Style;
|
use PhpOffice\PhpWord\Style;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @coversDefaultClass \PhpOffice\PhpWord\PhpWord
|
* Test for PHPWord main class
|
||||||
|
*
|
||||||
|
* @coversDefaultClass \PhpOffice\PhpWord\PhpWord
|
||||||
* @runTestsInSeparateProcesses
|
* @runTestsInSeparateProcesses
|
||||||
*/
|
*/
|
||||||
class PhpWordTest extends \PHPUnit_Framework_TestCase
|
class PhpWordTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
* Test object creation
|
||||||
|
*
|
||||||
* @covers ::getDocumentProperties
|
* @covers ::getDocumentProperties
|
||||||
* @covers ::getDefaultFontName
|
* @covers ::getDefaultFontName
|
||||||
* @covers ::getDefaultFontSize
|
* @covers ::getDefaultFontSize
|
||||||
|
|
@ -27,6 +40,8 @@ class PhpWordTest extends \PHPUnit_Framework_TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Test set/get document properties
|
||||||
|
*
|
||||||
* @covers ::setDocumentProperties
|
* @covers ::setDocumentProperties
|
||||||
* @covers ::getDocumentProperties
|
* @covers ::getDocumentProperties
|
||||||
*/
|
*/
|
||||||
|
|
@ -41,6 +56,8 @@ class PhpWordTest extends \PHPUnit_Framework_TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Test create/get section
|
||||||
|
*
|
||||||
* @covers ::createSection
|
* @covers ::createSection
|
||||||
* @covers ::getSections
|
* @covers ::getSections
|
||||||
*/
|
*/
|
||||||
|
|
@ -53,6 +70,8 @@ class PhpWordTest extends \PHPUnit_Framework_TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Test set/get default font name
|
||||||
|
*
|
||||||
* @covers ::setDefaultFontName
|
* @covers ::setDefaultFontName
|
||||||
* @covers ::getDefaultFontName
|
* @covers ::getDefaultFontName
|
||||||
*/
|
*/
|
||||||
|
|
@ -66,6 +85,8 @@ class PhpWordTest extends \PHPUnit_Framework_TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Test set/get default font size
|
||||||
|
*
|
||||||
* @covers ::setDefaultFontSize
|
* @covers ::setDefaultFontSize
|
||||||
* @covers ::getDefaultFontSize
|
* @covers ::getDefaultFontSize
|
||||||
*/
|
*/
|
||||||
|
|
@ -79,6 +100,8 @@ class PhpWordTest extends \PHPUnit_Framework_TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Test set default paragraph style
|
||||||
|
*
|
||||||
* @covers ::setDefaultParagraphStyle
|
* @covers ::setDefaultParagraphStyle
|
||||||
* @covers ::loadTemplate
|
* @covers ::loadTemplate
|
||||||
*/
|
*/
|
||||||
|
|
@ -90,6 +113,8 @@ class PhpWordTest extends \PHPUnit_Framework_TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Test add styles
|
||||||
|
*
|
||||||
* @covers ::addParagraphStyle
|
* @covers ::addParagraphStyle
|
||||||
* @covers ::addFontStyle
|
* @covers ::addFontStyle
|
||||||
* @covers ::addTableStyle
|
* @covers ::addTableStyle
|
||||||
|
|
@ -114,6 +139,8 @@ class PhpWordTest extends \PHPUnit_Framework_TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Test add title style
|
||||||
|
*
|
||||||
* @covers ::addTitleStyle
|
* @covers ::addTitleStyle
|
||||||
*/
|
*/
|
||||||
public function testAddTitleStyle()
|
public function testAddTitleStyle()
|
||||||
|
|
@ -126,6 +153,8 @@ class PhpWordTest extends \PHPUnit_Framework_TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Test load template
|
||||||
|
*
|
||||||
* @covers ::loadTemplate
|
* @covers ::loadTemplate
|
||||||
*/
|
*/
|
||||||
public function testLoadTemplate()
|
public function testLoadTemplate()
|
||||||
|
|
@ -140,14 +169,16 @@ class PhpWordTest extends \PHPUnit_Framework_TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::loadTemplate
|
* Test load template exception
|
||||||
|
*
|
||||||
|
* @covers ::loadTemplate
|
||||||
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
* @expectedException \PhpOffice\PhpWord\Exceptions\Exception
|
||||||
*/
|
*/
|
||||||
public function testLoadTemplateException()
|
public function testLoadTemplateException()
|
||||||
{
|
{
|
||||||
$templateFqfn = \join(
|
$templateFqfn = \join(
|
||||||
\DIRECTORY_SEPARATOR,
|
\DIRECTORY_SEPARATOR,
|
||||||
array(\PHPWORD_TESTS_BASE_DIR, 'PhpWord', 'Tests', 'data', 'templates', 'blanks.docx')
|
array(\PHPWORD_TESTS_BASE_DIR, 'PhpWord', 'Tests', '_files', 'templates', 'blanks.docx')
|
||||||
);
|
);
|
||||||
$phpWord = new PhpWord();
|
$phpWord = new PhpWord();
|
||||||
$phpWord->loadTemplate($templateFqfn);
|
$phpWord->loadTemplate($templateFqfn);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue