Skip to content

Commit e8c2195

Browse files
author
Emmanuel Campait
committed
ci/test: fix breadcrumb locale test and standalone PHPStan paths
1 parent eb8a07c commit e8c2195

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/phpstan.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@ jobs:
2727
- name: Install dependencies
2828
run: composer install --no-interaction --prefer-dist
2929

30+
- name: Prepare PHPStan temp directory
31+
run: mkdir -p build build/phpstan-tmp
32+
3033
- name: Run PHPStan
3134
run: vendor/bin/phpstan analyse -c phpstan.neon.dist

phpstan.neon.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ parameters:
99
excludePaths:
1010
- tests/_support/*
1111
scanDirectories:
12-
- ../../../vendor/codeigniter4/framework/system/Helpers
12+
- vendor/codeigniter4/framework/system/Helpers
1313
universalObjectCratesClasses:
1414
- CodeIgniter\Entity
1515
- CodeIgniter\Entity\Entity

tests/Unit/HasBreadcrumbTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
namespace domProjects\CodeIgniterBreadcrumb\Tests\Unit;
1515

16+
use Config\App;
1617
use CodeIgniter\Test\CIUnitTestCase;
1718
use domProjects\CodeIgniterBreadcrumb\Traits\HasBreadcrumb;
1819

@@ -25,6 +26,9 @@ protected function setUp(): void
2526
{
2627
parent::setUp();
2728

29+
$appConfig = config(App::class);
30+
$appConfig->supportedLocales = ['en', 'fr'];
31+
2832
$routes = service('routes');
2933
$routes->get('breadcrumb-test/home', '\App\Controllers\Home::index', ['as' => 'breadcrumb.home']);
3034
$routes->get('{locale}/breadcrumb-test/home', '\App\Controllers\Home::index', ['as' => 'breadcrumb.home.localized']);

0 commit comments

Comments
 (0)