2014-03-10 03:20:24 +07:00
|
|
|
<?php
|
2014-03-20 16:54:12 +04:00
|
|
|
namespace PhpWord\Tests\Style;
|
2014-03-10 03:20:24 +07:00
|
|
|
|
2014-03-19 11:04:48 +04:00
|
|
|
use PhpOffice\PhpWord\Style\ListItem;
|
2014-03-10 03:20:24 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @runTestsInSeparateProcesses
|
|
|
|
|
*/
|
|
|
|
|
class ListItemTest extends \PHPUnit_Framework_TestCase
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Test construct
|
|
|
|
|
*/
|
|
|
|
|
public function testConstruct()
|
|
|
|
|
{
|
2014-03-19 11:04:48 +04:00
|
|
|
$object = new ListItem();
|
2014-03-10 03:20:24 +07:00
|
|
|
|
2014-03-19 11:04:48 +04:00
|
|
|
$value = ListItem::TYPE_BULLET_FILLED;
|
2014-03-10 03:20:24 +07:00
|
|
|
$this->assertEquals($value, $object->getListType());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Test set style value
|
|
|
|
|
*/
|
|
|
|
|
public function testSetStyleValue()
|
|
|
|
|
{
|
2014-03-19 11:04:48 +04:00
|
|
|
$object = new ListItem();
|
2014-03-10 03:20:24 +07:00
|
|
|
|
2014-03-19 11:04:48 +04:00
|
|
|
$value = ListItem::TYPE_ALPHANUM;
|
2014-03-10 03:20:24 +07:00
|
|
|
$object->setStyleValue('_listType', $value);
|
|
|
|
|
$this->assertEquals($value, $object->getListType());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Test list type
|
|
|
|
|
*/
|
|
|
|
|
public function testListType()
|
|
|
|
|
{
|
2014-03-19 11:04:48 +04:00
|
|
|
$object = new ListItem();
|
2014-03-10 03:20:24 +07:00
|
|
|
|
2014-03-19 11:04:48 +04:00
|
|
|
$value = ListItem::TYPE_ALPHANUM;
|
2014-03-10 03:20:24 +07:00
|
|
|
$object->setListType($value);
|
|
|
|
|
$this->assertEquals($value, $object->getListType());
|
|
|
|
|
}
|
2014-03-11 21:44:54 +07:00
|
|
|
}
|