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

38 lines
905 B
PHP
Raw Normal View History

<?php
class LayoutTest extends PHPUnit_Framework_TestCase
{
public function setUp()
{
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();
$this->assertEquals($LayoutTargetValue,$result);
}
}