PHP Classes

File: tests/unit/Delimited/ReaderTest.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   PHP Skeleton Framework   tests/unit/Delimited/ReaderTest.php   Download  
File: tests/unit/Delimited/ReaderTest.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 8 years ago
Size: 586 bytes
 

Contents

Class file image Download
<?php

class Delimited_ReaderTest extends UnitTestCase {
   
    function
setUp() {
    }
   
    function
TearDown() {
    }
   
    function
testDelimited_ReaderNoFile() {
        
$reader = new A_Delimited_Reader();
       
$data = $reader->load();
        
       
$this->assertTrue($reader->isError());
       
$this->assertTrue($reader->getErrorMsg() != '');
       
$this->assertEqual($data, array());
    }
   
    function
testDelimited_ReaderCsvFile() {
       
$reader = new A_Delimited_Reader(dirname(__FILE__) . '/data1.csv');
       
$reader->setFieldDelimiter(','); // CSV
       
$data = $reader->load();
dump($data);
    }
   
}