You are here

function XLSExporterTest::testPropertiesAndTitle in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/aklump/loft_data_grids/tests/phpunit/XLSXExporterTest.php \AKlump\LoftDataGrids\XLSExporterTest::testPropertiesAndTitle()

File

vendor/aklump/loft_data_grids/tests/XLSExporterTest.php, line 71
Tests for the XLSExporter class

Class

XLSExporterTest

Namespace

AKlump\LoftDataGrids

Code

function testPropertiesAndTitle() {
  $obj = $this->exporter;
  $subject = array(
    'Creator' => 'do',
    'LastModifiedBy' => 're',
    'Title' => 'mi',
    'Description' => 'fa',
    'Keywords' => 'so',
    'Category' => 'la',
  );
  $return = $obj
    ->setProperties($subject);
  $this
    ->assertInstanceOf('AKlump\\LoftDataGrids\\XLSXExporter', $return);
  $this
    ->assertNull($obj
    ->getProperty('BreakfastMenu'));
  $this
    ->assertSame('do', $obj
    ->getProperty('Creator'));
  $this
    ->assertSame('re', $obj
    ->getProperty('LastModifiedBy'));
  $this
    ->assertSame('mi', $obj
    ->getProperty('Title'));
  $this
    ->assertSame('fa', $obj
    ->getProperty('Description'));
  $this
    ->assertSame('so', $obj
    ->getProperty('Keywords'));
  $this
    ->assertSame('la', $obj
    ->getProperty('Category'));
  $obj
    ->setTitle('ti');
  $this
    ->assertSame('ti', $obj
    ->getProperty('Title'));
}