From e7ba5bf7b6ad70d6cc9d09e603cd1bef45dac93e Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 8 Oct 2020 15:12:24 +0200 Subject: [PATCH] fix tests and replace file_exists --- Controller/BackendController.php | 2 +- Controller/SearchController.php | 2 +- Controller/TimerecordingController.php | 2 +- tests/Views/NavigationViewTest.php | 8 ++++++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 6b961a8..46f9bd8 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -120,7 +120,7 @@ final class BackendController extends Controller foreach ($languages as $path) { $path = __DIR__ . '/../../..' . $path . '.' . $langCode . '.lang.php'; - if (!\file_exists($path)) { + if (!\is_file($path)) { continue; } diff --git a/Controller/SearchController.php b/Controller/SearchController.php index a092353..9b1f294 100755 --- a/Controller/SearchController.php +++ b/Controller/SearchController.php @@ -106,7 +106,7 @@ final class SearchController extends Controller foreach ($languages as $path) { $path = __DIR__ . '/../../..' . $path . '.' . $langCode . '.lang.php'; - if (!\file_exists($path)) { + if (!\is_file($path)) { continue; } diff --git a/Controller/TimerecordingController.php b/Controller/TimerecordingController.php index 5b56292..59af48b 100755 --- a/Controller/TimerecordingController.php +++ b/Controller/TimerecordingController.php @@ -115,7 +115,7 @@ final class TimerecordingController extends Controller foreach ($languages as $path) { $path = __DIR__ . '/../../..' . $path . '.' . $langCode . '.lang.php'; - if (!\file_exists($path)) { + if (!\is_file($path)) { continue; } diff --git a/tests/Views/NavigationViewTest.php b/tests/Views/NavigationViewTest.php index 6249f9d..fd2c771 100755 --- a/tests/Views/NavigationViewTest.php +++ b/tests/Views/NavigationViewTest.php @@ -21,6 +21,10 @@ use Modules\Navigation\Views\NavigationView; */ class NavigationViewTest extends \PHPUnit\Framework\TestCase { + /** + * @covers Modules\Navigation\Views\NavigationView + * @group module + */ public function testDefault() : void { $view = new NavigationView(); @@ -30,6 +34,10 @@ class NavigationViewTest extends \PHPUnit\Framework\TestCase self::assertEquals(0, $view->getParent()); } + /** + * @covers Modules\Navigation\Views\NavigationView + * @group module + */ public function testGetSet() : void { $view = new NavigationView();