PhpSpreadsheet/unitTests/Classes/PHPExcel/Chart/LayoutTest.php

36 lines
897 B
PHP
Raw Normal View History

<?php
class LayoutTest extends PHPUnit_Framework_TestCase
{
public function setUp()
{
2015-05-17 16:34:30 +00:00
if (!defined('PHPEXCEL_ROOT')) {
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
}
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
2015-05-17 13:00:02 +00:00
}
2015-05-17 13:00:02 +00:00
public function testSetLayoutTarget()
{
$LayoutTargetValue = 'String';
2015-05-17 13:00:02 +00:00
$testInstance = new PHPExcel_Chart_Layout;
2015-05-17 13:00:02 +00:00
$result = $testInstance->setLayoutTarget($LayoutTargetValue);
$this->assertTrue($result instanceof PHPExcel_Chart_Layout);
}
2015-05-17 13:00:02 +00:00
public function testGetLayoutTarget()
{
$LayoutTargetValue = 'String';
2015-05-17 13:00:02 +00:00
$testInstance = new PHPExcel_Chart_Layout;
$setValue = $testInstance->setLayoutTarget($LayoutTargetValue);
2015-05-17 13:00:02 +00:00
$result = $testInstance->getLayoutTarget();
2015-05-17 16:34:30 +00:00
$this->assertEquals($LayoutTargetValue, $result);
2015-05-17 13:00:02 +00:00
}
}