From c724440587cb0746783e924c37e7cc5b50cebb73 Mon Sep 17 00:00:00 2001 From: Domingo Oropeza Date: Tue, 11 Sep 2018 15:17:44 -0400 Subject: [PATCH] test(fdroid): fix test for market on Windows Signed-off-by: Domingo Oropeza --- tests/suite-unit/PluginFlyvemdmFdroidMarket.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/suite-unit/PluginFlyvemdmFdroidMarket.php b/tests/suite-unit/PluginFlyvemdmFdroidMarket.php index ebdbcbab..78975414 100644 --- a/tests/suite-unit/PluginFlyvemdmFdroidMarket.php +++ b/tests/suite-unit/PluginFlyvemdmFdroidMarket.php @@ -125,7 +125,7 @@ public function testCronInfo($name, $expected) { * @tags testCronUpdateRepositories */ public function testCronUpdateRepositories() { - $fixtureFile = __DIR__ . '/../fixtures/fdroid-repo.xml'; + $fixtureFile = realpath(__DIR__ . '/../fixtures/fdroid-repo.xml'); $this->boolean(is_readable($fixtureFile)); $instances = [ $this->newTestedInstance(), @@ -134,7 +134,7 @@ public function testCronUpdateRepositories() { foreach ($instances as $instance) { $instance->add([ 'name' => $this->getUniqueString(), - 'url' => $fixtureFile, + 'url' => addslashes($fixtureFile), ]); } \PluginFlyvemdmFDroidMarket::cronUpdateRepositories(new \CronTask()); @@ -153,7 +153,7 @@ public function testCronUpdateRepositories() { */ public function testUpdateRepository() { // Create a market instance for the test - $fixtureFile = __DIR__ . '/../fixtures/fdroid-repo.xml'; + $fixtureFile = realpath(__DIR__ . '/../fixtures/fdroid-repo.xml'); $this->boolean(is_readable($fixtureFile)); $instance = $this->newTestedInstance(); @@ -162,7 +162,7 @@ public function testUpdateRepository() { $instance->add([ 'name' => $this->getUniqueString(), - 'url' => $fixtureFile, + 'url' => addslashes($fixtureFile), ]); // Check there is not yet any app @@ -182,10 +182,10 @@ public function testUpdateRepository() { $this->array($rows)->size->isEqualTo(1, json_encode($rows, JSON_PRETTY_PRINT)); // Emulate an update of the market with the ap removed from it - $fixtureFile = __DIR__ . '/../fixtures/fdroid-repo-app-removed.xml'; + $fixtureFile = realpath(__DIR__ . '/../fixtures/fdroid-repo-app-removed.xml'); $instance->update([ 'id' => $marketId, - 'url' => $fixtureFile, + 'url' => addslashes($fixtureFile), ]); $instance->getFromDB($marketId); $volume = $instance->updateRepository();