init introduce namespaces

This commit is contained in:
Susann Sgorzaly
2018-02-17 23:41:03 +01:00
parent 0e5afb209e
commit a7a0bc34a4
7 changed files with 44 additions and 38 deletions

View File

@@ -1,13 +1,18 @@
<?php
namespace CSV\tests\methods;
class ParseTest extends PHPUnit\Framework\TestCase {
use CSV\Csv;
use PHPUnit_Framework_TestCase as TestCase;
class ParseTest extends TestCase
{
/**
* CSV
* The parseCSV object
* The CSV object
*
* @access protected
* @var parseCSV
* @var Csv
*/
protected $csv;
@@ -18,7 +23,7 @@ class ParseTest extends PHPUnit\Framework\TestCase {
* @access public
*/
public function setUp() {
$this->csv = new parseCSV();
$this->csv = new Csv();
}
public function test_parse() {
@@ -182,7 +187,7 @@ class ParseTest extends PHPUnit\Framework\TestCase {
* @param string $enclosure
*/
public function testAutoQuotes($file, $enclosure) {
$csv = new parseCSV();
$csv = new Csv();
$csv->auto($file, true, null, null, $enclosure);
$this->assertArrayHasKey('column1', $csv->data[0], 'Data parsed incorrectly with enclosure ' . $enclosure);
$this->assertEquals('value1', $csv->data[0]['column1'], 'Data parsed incorrectly with enclosure ' . $enclosure);