fix tests and replace file_exists

This commit is contained in:
Dennis Eichhorn 2020-10-08 15:12:24 +02:00
parent c270825cea
commit e7ba5bf7b6
4 changed files with 11 additions and 3 deletions

View File

@ -120,7 +120,7 @@ final class BackendController extends Controller
foreach ($languages as $path) { foreach ($languages as $path) {
$path = __DIR__ . '/../../..' . $path . '.' . $langCode . '.lang.php'; $path = __DIR__ . '/../../..' . $path . '.' . $langCode . '.lang.php';
if (!\file_exists($path)) { if (!\is_file($path)) {
continue; continue;
} }

View File

@ -106,7 +106,7 @@ final class SearchController extends Controller
foreach ($languages as $path) { foreach ($languages as $path) {
$path = __DIR__ . '/../../..' . $path . '.' . $langCode . '.lang.php'; $path = __DIR__ . '/../../..' . $path . '.' . $langCode . '.lang.php';
if (!\file_exists($path)) { if (!\is_file($path)) {
continue; continue;
} }

View File

@ -115,7 +115,7 @@ final class TimerecordingController extends Controller
foreach ($languages as $path) { foreach ($languages as $path) {
$path = __DIR__ . '/../../..' . $path . '.' . $langCode . '.lang.php'; $path = __DIR__ . '/../../..' . $path . '.' . $langCode . '.lang.php';
if (!\file_exists($path)) { if (!\is_file($path)) {
continue; continue;
} }

View File

@ -21,6 +21,10 @@ use Modules\Navigation\Views\NavigationView;
*/ */
class NavigationViewTest extends \PHPUnit\Framework\TestCase class NavigationViewTest extends \PHPUnit\Framework\TestCase
{ {
/**
* @covers Modules\Navigation\Views\NavigationView
* @group module
*/
public function testDefault() : void public function testDefault() : void
{ {
$view = new NavigationView(); $view = new NavigationView();
@ -30,6 +34,10 @@ class NavigationViewTest extends \PHPUnit\Framework\TestCase
self::assertEquals(0, $view->getParent()); self::assertEquals(0, $view->getParent());
} }
/**
* @covers Modules\Navigation\Views\NavigationView
* @group module
*/
public function testGetSet() : void public function testGetSet() : void
{ {
$view = new NavigationView(); $view = new NavigationView();