You are here

class ValuesOnlyExporterTest in Loft Data Grids 7.2

Hierarchy

Expanded class hierarchy of ValuesOnlyExporterTest

File

vendor/aklump/loft_data_grids/tests/phpunit/ValuesOnlyExporterTest.php, line 11
Tests for the ValuesOnlyExporter class

Namespace

AKlump\LoftDataGrids
View source
class ValuesOnlyExporterTest extends ExporterBase {
  public function testOutput0() {
    $control = "1181\\US\\0";
    $subject = $this->exporter
      ->export(0);
    $this
      ->assertSame($control, $subject);
  }
  public function testOutput1() {
    $control = "1182\\11/7/13\\Hope, Roberta";
    $subject = $this->exporter
      ->export(1);
    $this
      ->assertSame($control, $subject);
  }
  public function testOutput() {
    $control = "1181\\US\\0\r\n1182\\11/7/13\\Hope, Roberta";
    $subject = $this->exporter
      ->export();
    $this
      ->assertSame($control, $subject);
    $this
      ->assertMethodSaveFile();
    $this
      ->assertSandboxFileContents($control);
  }
  public function testInfoValues() {
    $info = $this->exporter
      ->getInfo();
    $this
      ->assertSame('.txt', $info['extension']);
  }
  public function setUp() {
    parent::setUp();
    $this->exporter = new ValuesOnlyExporter($this->data);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ExporterBase::assertDateHandlerWorks public function
ExporterBase::assertMethodSaveFile public function Make sure that saveFile creates a file and returns the path.
ExporterBase::assertSandboxFileContents public function
ExporterBase::assertSandboxFileEquals public function Compare the sandbox file against it's control file.
ExporterBase::tearDown public function
ExporterBase::testCompileReturnsSelf public function
ExporterBase::testInfo public function
ExporterBase::testSaveFileToUnwriteableDirThrows public function @expectedException RuntimeException
ValuesOnlyExporterTest::setUp public function Overrides ExporterBase::setUp
ValuesOnlyExporterTest::testInfoValues public function
ValuesOnlyExporterTest::testOutput public function
ValuesOnlyExporterTest::testOutput0 public function
ValuesOnlyExporterTest::testOutput1 public function