Skip to content

Commit 5893dbf

Browse files
committed
fix tests
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent 13b5a90 commit 5893dbf

10 files changed

Lines changed: 101 additions & 97 deletions

File tree

.github/workflows/phpunit-mysql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
mkdir -p ~/html
6262
echo "git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.server-versions }} ~/html/nextcloud"
6363
git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.server-versions }} ~/html/nextcloud
64-
sed -i $'s|if (substr($fullPath, 0, strlen($root) + 1) === $root . \'/\')|if (is_string($root) and substr($fullPath, 0, strlen($root) + 1) === $root . \'/\')|g' ~/html/nextcloud/lib/autoloader.php
64+
#sed -i $'s|if (substr($fullPath, 0, strlen($root) + 1) === $root . \'/\')|if (is_string($root) and substr($fullPath, 0, strlen($root) + 1) === $root . \'/\')|g' ~/html/nextcloud/lib/autoloader.php
6565
cp -r $GITHUB_WORKSPACE ~/html/nextcloud/apps/${{ env.APP_ID }}
6666
# SETUP NEXTCLOUD
6767
export DB_PORT=4444

.github/workflows/phpunit-pgsql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
mkdir -p ~/html
6464
echo "git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.server-versions }} ~/html/nextcloud"
6565
git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.server-versions }} ~/html/nextcloud
66-
sed -i $'s|if (substr($fullPath, 0, strlen($root) + 1) === $root . \'/\')|if (is_string($root) and substr($fullPath, 0, strlen($root) + 1) === $root . \'/\')|g' ~/html/nextcloud/lib/autoloader.php
66+
#sed -i $'s|if (substr($fullPath, 0, strlen($root) + 1) === $root . \'/\')|if (is_string($root) and substr($fullPath, 0, strlen($root) + 1) === $root . \'/\')|g' ~/html/nextcloud/lib/autoloader.php
6767
cp -r $GITHUB_WORKSPACE ~/html/nextcloud/apps/${{ env.APP_ID }}
6868
# SETUP NEXTCLOUD
6969
export DB_PORT=4445

.github/workflows/phpunit-sqlite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
mkdir -p ~/html
5353
echo "git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.server-versions }} ~/html/nextcloud"
5454
git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.server-versions }} ~/html/nextcloud
55-
sed -i $'s|if (substr($fullPath, 0, strlen($root) + 1) === $root . \'/\')|if (is_string($root) and substr($fullPath, 0, strlen($root) + 1) === $root . \'/\')|g' ~/html/nextcloud/lib/autoloader.php
55+
#sed -i $'s|if (substr($fullPath, 0, strlen($root) + 1) === $root . \'/\')|if (is_string($root) and substr($fullPath, 0, strlen($root) + 1) === $root . \'/\')|g' ~/html/nextcloud/lib/autoloader.php
5656
cp -r $GITHUB_WORKSPACE ~/html/nextcloud/apps/${{ env.APP_ID }}
5757
# SETUP NEXTCLOUD
5858
echo "php ~/html/nextcloud/occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin"

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"require-dev": {
2929
"nextcloud/coding-standard": "^1.1",
30-
"psalm/phar": "^6.1.0",
30+
"psalm/phar": "6.4.0",
3131
"nextcloud/ocp": "dev-master",
3232
"phpunit/phpunit": "^9.5"
3333
}

composer.lock

Lines changed: 69 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Controller/PageController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,9 +786,9 @@ public function addDirectoryRecursive(string $path): DataResponse {
786786
$files = $this->processService->searchFilesWithExt($folder, $sharedAllowed, $mountedAllowed, $extensions);
787787
$alldirs = [];
788788
foreach ($files as $file) {
789-
if ($file instanceof File &&
789+
if ($file instanceof File
790790
// name extension is supported
791-
(
791+
&& (
792792
in_array('.' . pathinfo($file->getName(), PATHINFO_EXTENSION), array_keys(ConversionService::fileExtToGpsbabelFormat))
793793
|| in_array('.' . pathinfo($file->getName(), PATHINFO_EXTENSION), $this->upperExtensions)
794794
)

lib/Service/ConversionService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,8 +523,8 @@ public function igcToGpx($fh, $trackOptions) {
523523
$gpx_time = $domGpx->createElement('time');
524524
$gpx_trkpt->appendChild($gpx_time);
525525
$gpx_time_text = $domGpx->createTextNode(
526-
$date->format('Y-m-d') .
527-
'T' . substr($line, 1, 2) . ':' . substr($line, 3, 2) . ':' . substr($line, 5, 2)
526+
$date->format('Y-m-d')
527+
. 'T' . substr($line, 1, 2) . ':' . substr($line, 3, 2) . ':' . substr($line, 5, 2)
528528
);
529529
$gpx_time->appendChild($gpx_time_text);
530530

0 commit comments

Comments
 (0)