Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 6 |
CRAP | |
0.00% |
0 / 23 |
| construct_methods_Test | |
0.00% |
0 / 1 |
|
0.00% |
0 / 6 |
42 | |
0.00% |
0 / 23 |
| setUp() | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| tearDown() | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| test_offset_param() | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 5 |
|||
| test_limit_param() | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 5 |
|||
| test_conditions_param() | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 5 |
|||
| test_input_param() | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 5 |
|||
| <?php | |
| class construct_methods_Test extends PHPUnit_Framework_TestCase { | |
| /** | |
| * CSV | |
| * The parseCSV object | |
| * | |
| * @access protected | |
| * @var [parseCSV] | |
| */ | |
| protected $csv = null; | |
| /** | |
| * Setup | |
| * Setup our test environment objects | |
| * | |
| * @access public | |
| */ | |
| public function setUp() { | |
| //setup parse CSV | |
| #$this->csv = new parseCSV(); | |
| } | |
| /** | |
| * Tear down | |
| * Tear down our test environment objects | |
| * | |
| * @access public | |
| */ | |
| public function tearDown() { | |
| $this->csv = null; | |
| } | |
| public function test_offset_param() { | |
| $offset = 10; | |
| $this->csv = new parseCSV(null,$offset); | |
| $this->assertTrue(is_numeric($this->csv->offset)); | |
| $this->assertEquals($offset,$this->csv->offset); | |
| } | |
| public function test_limit_param() { | |
| $limit = 10; | |
| $this->csv = new parseCSV(null,null,$limit); | |
| $this->assertTrue(is_numeric($this->csv->limit)); | |
| $this->assertEquals($limit,$this->csv->limit); | |
| } | |
| public function test_conditions_param() { | |
| $conditions = 'some column NOT value'; | |
| $this->csv = new parseCSV(null,null,null,$conditions); | |
| $this->assertTrue(is_string($this->csv->conditions)); | |
| $this->assertEquals($conditions,$this->csv->conditions); | |
| } | |
| public function test_input_param() { | |
| $csv = "col1,col2,col3\r\nval1,val2,val3\r\nval1A,val2A,val3A\r\n"; | |
| $this->csv = new parseCSV($csv); | |
| print_r($this->csv); | |
| $this->assertTrue(is_string($this->csv->file_data)); | |
| } |