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

Commit

Permalink
test(fdroid): fix test for market on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Domingo Oropeza <[email protected]>
  • Loading branch information
DIOHz0r committed Sep 11, 2018
1 parent bc7ee0e commit c724440
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/suite-unit/PluginFlyvemdmFdroidMarket.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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());
Expand All @@ -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();

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

$instance->add([
'name' => $this->getUniqueString(),
'url' => $fixtureFile,
'url' => addslashes($fixtureFile),
]);

// Check there is not yet any app
Expand All @@ -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();
Expand Down

0 comments on commit c724440

Please sign in to comment.