@@ -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