Skip to content

Commit

Permalink
[BUGFIX] Removed php 8.0 from github actions to prevent old phpunit r…
Browse files Browse the repository at this point in the history
…equirement, fixed CrawlerControllerTest for v11
  • Loading branch information
Riny van Tiggelen committed Nov 14, 2024
1 parent ffab25a commit 4f35439
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ jobs:
typo3: ['11', '12', '13']
composerInstall: ['composerInstallLowest', 'composerInstallHighest']
include:
- typo3: '11'
php: '8.0'
composerInstall: 'composerInstallLowest'
- typo3: '11'
php: '8.0'
composerInstall: 'composerInstallHighest'
- typo3: '11'
php: '8.1'
composerInstall: 'composerInstallLowest'
Expand Down Expand Up @@ -55,9 +49,7 @@ jobs:
run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s phpstan -e "--error-format=github"

- name: Functional tests
if: ${{ matrix.php != '8.0' }} # Functional tests are not supported for PHP 8.0 due to PHP requirement of phpunit ^10
run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s functional

- name: Unit tests
if: ${{ matrix.php != '8.0' }} # Unit tests are not supported for PHP 8.0 due to PHP requirement of phpunit ^10
run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s unit
10 changes: 8 additions & 2 deletions Tests/Unit/Controller/CrawlerControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
use PHPUnit\Framework\Attributes\Test;
use TYPO3\CMS\Core\Http\HtmlResponse;
use TYPO3\CMS\Core\Http\RedirectResponse;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Site\SiteFinder;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use TYPO3\CMS\Extbase\Mvc\Exception\StopActionException;
use TYPO3\CMS\Extbase\Mvc\Request;
use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
Expand Down Expand Up @@ -72,8 +74,12 @@ public function indexActionReturnsHtmlResponse(): void
#[Test]
public function resetProgressActionReturnsRedirectResponse(): void
{
if ((new Typo3Version())->getMajorVersion() === 11) {
$this->expectException(StopActionException::class);
}
$result = $this->subject->resetProgressAction(1, 1);

self::assertInstanceOf(RedirectResponse::class, $result);
if ((new Typo3Version())->getMajorVersion() > 11) {
self::assertInstanceOf(RedirectResponse::class, $result);
}
}
}

0 comments on commit 4f35439

Please sign in to comment.