From 1e9ebe90d9637e452b332674b7a9b3db1845a44c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joao=20Gilberto=20Magalh=C3=A3es?= Date: Tue, 9 Jan 2018 16:10:18 -0200 Subject: [PATCH] Changed RemoteURL tests --- tests/Dataset/TextFileDatasetTest.php | 32 ++++++++++++++++++--------- tests/Store/RouteTest.php | 10 --------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/tests/Dataset/TextFileDatasetTest.php b/tests/Dataset/TextFileDatasetTest.php index dc123bf..51763a7 100644 --- a/tests/Dataset/TextFileDatasetTest.php +++ b/tests/Dataset/TextFileDatasetTest.php @@ -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() { @@ -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; @@ -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; @@ -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; @@ -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; @@ -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(); } diff --git a/tests/Store/RouteTest.php b/tests/Store/RouteTest.php index 7996939..2872591 100644 --- a/tests/Store/RouteTest.php +++ b/tests/Store/RouteTest.php @@ -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() - { - - } }