Skip to content

Commit

Permalink
[TASK] Adjust a test case to mark skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessCoder committed Jul 18, 2024
1 parent c45c735 commit 253cdd0
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,16 +365,17 @@ public function getAssertBackendUserGroupLoggedInTestValues(): array
*/
public function testAssertAdminLoggedIn(?array $currentUser, bool $expected): void
{
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '11.5', '>=')) {
$this->markTestSkipped('Aspects implementation is tested by the core');
}
$instance = $this->getMockBuilder($this->getViewHelperClassName())
->setMethods(['getCurrentBackendUser'])
->disableOriginalConstructor()
->getMockForAbstractClass();
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '11.5', '<')) {
$instance->expects($this->atLeastOnce())->method('getCurrentBackendUser')->willReturn($currentUser);
$result = $instance->assertAdminLoggedIn();
$this->assertEquals($expected, $result);
}
// no test for TYPO3 11.5 and above, as the aspects implementation is tested by the core

$instance->expects($this->atLeastOnce())->method('getCurrentBackendUser')->willReturn($currentUser);
$result = $instance->assertAdminLoggedIn();
$this->assertEquals($expected, $result);
}

public function getAssertAdminLoggedInTestValues(): array
Expand Down

0 comments on commit 253cdd0

Please sign in to comment.