mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
init introduce namespaces
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user