PHPWord/tests/PhpWord/Tests/Writer/Word2007/DocPropsTest.php

45 lines
1.1 KiB
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\Writer\Word2007;
use PhpOffice\PhpWord\Writer\Word2007\DocProps;
/**
* Test class for PhpOffice\PhpWord\Writer\Word2007\DocProps
*
* @coversDefaultClass \PhpOffice\PhpWord\Writer\Word2007\DocProps
* @runTestsInSeparateProcesses
*/
class DocPropsTest extends \PHPUnit_Framework_TestCase
{
/**
* Test write docProps/app.xml with no PhpWord
*
* @expectedException \PhpOffice\PhpWord\Exception\Exception
* @expectedExceptionMessage No PhpWord assigned.
*/
public function testWriteDocPropsAppNoPhpWord()
{
$object = new DocProps();
$object->writeDocPropsApp();
}
/**
* Test write docProps/core.xml with no PhpWord
*
* @expectedException \PhpOffice\PhpWord\Exception\Exception
* @expectedExceptionMessage No PhpWord assigned.
*/
public function testWriteDocPropsCoreNoPhpWord()
{
$object = new DocProps();
$object->writeDocPropsCore();
}
}