Skip to content

Commit

Permalink
Ignore missing class_alias call in filter validation for Moodle 4.5 a…
Browse files Browse the repository at this point in the history
…nd above
  • Loading branch information
PhMemmel committed Jan 7, 2025
1 parent 18fe3e1 commit 50417eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/PluginValidate/Requirements/FilterRequirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function getRequiredStrings(): FileTokens

public function getRequiredFunctionCalls(): array
{
if ($this->moodleVersion <= 404 && !$this->fileExists('classes/text_filter.php')) {
if ($this->moodleVersion >= 405 || ($this->moodleVersion <= 404 && !$this->fileExists('classes/text_filter.php'))) {
return [];
}

Expand Down
2 changes: 2 additions & 0 deletions tests/PluginValidate/Requirements/FilterRequirementsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ public function testGetRequiredFunctionCalls404()
public function testGetRequiredFunctionCalls()
{
$calls = $this->requirements->getRequiredFunctionCalls();
$this->assertCount(0, $calls);

$calls = $this->requirements404->getRequiredFunctionCalls();
$this->assertCount(1, $calls);
$call = reset($calls);
$this->assertInstanceOf('MoodlePluginCI\PluginValidate\Finder\FileTokens', $call);
Expand Down

0 comments on commit 50417eb

Please sign in to comment.