PHPWord/tests/PhpWord/Tests/FootnoteTest.php
Ivan Lanin 07be5eaea3 Adding more functionalities to containers:
- Table: Ability to add footnote in table cell
- Footnote: Ability to add image in footnote
- ListItem: Ability to add list item in header/footer
- CheckBox: Ability to add checkbox in header/footer
- Link: Ability to add link in header/footer
2014-04-01 18:36:35 +07:00

35 lines
899 B
PHP

<?php
/**
* PHPWord
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
*/
namespace PhpOffice\PhpWord\Tests;
use PhpOffice\PhpWord\Footnote;
/**
* Test class for PhpOffice\PhpWord\Footnote
*
* @runTestsInSeparateProcesses
*/
class FootnoteTest extends \PHPUnit_Framework_TestCase
{
/**
* Test add, get, and count footnote elements and links
*/
public function testFootnote()
{
$footnoteElement = new \PhpOffice\PhpWord\Element\Footnote();
$rIdFootnote = Footnote::addFootnoteElement($footnoteElement);
$rIdLink = Footnote::addFootnoteLinkElement('http://test.com');
$this->assertEquals(1, $rIdFootnote);
$this->assertEquals(1, $rIdLink);
$this->assertEquals(1, count(Footnote::getFootnoteElements()));
}
}