Skip to content
This repository was archived by the owner on Aug 9, 2021. It is now read-only.

Commit c724440

Browse files
committed
test(fdroid): fix test for market on Windows
Signed-off-by: Domingo Oropeza <[email protected]>
1 parent bc7ee0e commit c724440

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/suite-unit/PluginFlyvemdmFdroidMarket.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function testCronInfo($name, $expected) {
125125
* @tags testCronUpdateRepositories
126126
*/
127127
public function testCronUpdateRepositories() {
128-
$fixtureFile = __DIR__ . '/../fixtures/fdroid-repo.xml';
128+
$fixtureFile = realpath(__DIR__ . '/../fixtures/fdroid-repo.xml');
129129
$this->boolean(is_readable($fixtureFile));
130130
$instances = [
131131
$this->newTestedInstance(),
@@ -134,7 +134,7 @@ public function testCronUpdateRepositories() {
134134
foreach ($instances as $instance) {
135135
$instance->add([
136136
'name' => $this->getUniqueString(),
137-
'url' => $fixtureFile,
137+
'url' => addslashes($fixtureFile),
138138
]);
139139
}
140140
\PluginFlyvemdmFDroidMarket::cronUpdateRepositories(new \CronTask());
@@ -153,7 +153,7 @@ public function testCronUpdateRepositories() {
153153
*/
154154
public function testUpdateRepository() {
155155
// Create a market instance for the test
156-
$fixtureFile = __DIR__ . '/../fixtures/fdroid-repo.xml';
156+
$fixtureFile = realpath(__DIR__ . '/../fixtures/fdroid-repo.xml');
157157
$this->boolean(is_readable($fixtureFile));
158158
$instance = $this->newTestedInstance();
159159

@@ -162,7 +162,7 @@ public function testUpdateRepository() {
162162

163163
$instance->add([
164164
'name' => $this->getUniqueString(),
165-
'url' => $fixtureFile,
165+
'url' => addslashes($fixtureFile),
166166
]);
167167

168168
// Check there is not yet any app
@@ -182,10 +182,10 @@ public function testUpdateRepository() {
182182
$this->array($rows)->size->isEqualTo(1, json_encode($rows, JSON_PRETTY_PRINT));
183183

184184
// Emulate an update of the market with the ap removed from it
185-
$fixtureFile = __DIR__ . '/../fixtures/fdroid-repo-app-removed.xml';
185+
$fixtureFile = realpath(__DIR__ . '/../fixtures/fdroid-repo-app-removed.xml');
186186
$instance->update([
187187
'id' => $marketId,
188-
'url' => $fixtureFile,
188+
'url' => addslashes($fixtureFile),
189189
]);
190190
$instance->getFromDB($marketId);
191191
$volume = $instance->updateRepository();

0 commit comments

Comments
 (0)