Skip to content

Commit

Permalink
Changed RemoteURL tests
Browse files Browse the repository at this point in the history
  • Loading branch information
byjg committed Jan 9, 2018
1 parent f4e2c2a commit 1e9ebe9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
32 changes: 22 additions & 10 deletions tests/Dataset/TextFileDatasetTest.php
Expand Up @@ -21,7 +21,7 @@ class TextFileDatasetTest extends \PHPUnit\Framework\TestCase
protected static $fileName_MacClassic = "";
protected static $fileName_BlankLine = "";

const RemoteURL = "http://www.xmlnuke.com/site/";
const REMOTEURL = "https://firebasestorage.googleapis.com/v0/b/testing-bb65f.appspot.com/o/anydataset%%2F%s?alt=media";

public static function setUpBeforeClass()
{
Expand Down Expand Up @@ -182,8 +182,11 @@ public function testnavigateTextIterator_BlankLine()

public function testnavigateTextIterator_Remote_Unix()
{
$txtFile = new TextFileDataset(self::RemoteURL . basename(self::$fileName_Unix), self::$fieldNames,
TextFileDataset::CSVFILE);
$txtFile = new TextFileDataset(
sprintf(self::REMOTEURL, basename(self::$fileName_Unix)),
self::$fieldNames,
TextFileDataset::CSVFILE
);
$txtIterator = $txtFile->getIterator();

$count = 0;
Expand All @@ -196,8 +199,11 @@ public function testnavigateTextIterator_Remote_Unix()

public function testnavigateTextIterator_Remote_Windows()
{
$txtFile = new TextFileDataset(self::RemoteURL . basename(self::$fileName_Windows), self::$fieldNames,
TextFileDataset::CSVFILE);
$txtFile = new TextFileDataset(
sprintf(self::REMOTEURL, basename(self::$fileName_Windows)),
self::$fieldNames,
TextFileDataset::CSVFILE
);
$txtIterator = $txtFile->getIterator();

$count = 0;
Expand All @@ -213,8 +219,11 @@ public function testnavigateTextIterator_Remote_Windows()
*/
public function testnavigateTextIterator_Remote_MacClassic()
{
$txtFile = new TextFileDataset(self::RemoteURL . basename(self::$fileName_MacClassic), self::$fieldNames,
TextFileDataset::CSVFILE);
$txtFile = new TextFileDataset(
sprintf(self::REMOTEURL, basename(self::$fileName_MacClassic)),
self::$fieldNames,
TextFileDataset::CSVFILE
);
$txtIterator = $txtFile->getIterator();

$count = 0;
Expand All @@ -227,8 +236,11 @@ public function testnavigateTextIterator_Remote_MacClassic()

public function testnavigateTextIterator_Remote_BlankLine()
{
$txtFile = new TextFileDataset(self::RemoteURL . basename(self::$fileName_BlankLine), self::$fieldNames,
TextFileDataset::CSVFILE);
$txtFile = new TextFileDataset(
sprintf(self::REMOTEURL, basename(self::$fileName_BlankLine)),
self::$fieldNames,
TextFileDataset::CSVFILE
);
$txtIterator = $txtFile->getIterator();

$count = 0;
Expand All @@ -252,7 +264,7 @@ public function testfileNotFound()
*/
public function testremoteFileNotFound()
{
$txtFile = new TextFileDataset(self::RemoteURL . "notfound-test", self::$fieldNames, TextFileDataset::CSVFILE);
$txtFile = new TextFileDataset(self::REMOTEURL . "notfound-test", self::$fieldNames, TextFileDataset::CSVFILE);
$txtFile->getIterator();
}

Expand Down
10 changes: 0 additions & 10 deletions tests/Store/RouteTest.php
Expand Up @@ -183,14 +183,4 @@ public function testAddRouteForFilterFail()
$this->object->addRouteForFilter('route3', 'id', '3');
$this->object->matchRoute('SELECT field1, fields fRom othertable where id=31');
}

public function testAddCustomRoute()
{

}

public function testMatchRoute()
{

}
}

0 comments on commit 1e9ebe9

Please sign in to comment.