Skip to content

Commit 020457f

Browse files
committed
Some deprecations are now calculated twice.
Both: - PHPCompatibility - moodle PHP deprecations own Sniff are able to detect some PHP officially deprecated functions.
1 parent 49bfb99 commit 020457f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Command/CodeCheckerCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function testExecuteFail()
7272
<?php
7373
7474
if (true) {
75-
$var = ldap_sort(); // To verify PHPCompatibility own sniff.
75+
$var = ldap_sort(); // To verify both PHPCompatibility and own moodle deprecations sniff.
7676
} elseif (false) {
7777
$var = print_object(); // To verify moodle own sniff.
7878
@@ -88,7 +88,7 @@ public function testExecuteFail()
8888
$output = $this->getActualOutput();
8989
$this->assertRegExp('/E\.* 8\.* \/ 8 \(100%\)/', $output); // Progress.
9090
$this->assertRegExp('/\/fixable.php/', $output); // File.
91-
$this->assertRegExp('/ (4|5) ERRORS AND 1 WARNING AFFECTING 5 /', $output); // Summary (php70 shows one less)
91+
$this->assertRegExp('/ (4|5) ERRORS AND 2 WARNINGS AFFECTING 5 /', $output); // Summary (php70 shows one less)
9292
$this->assertRegexp('/moodle\.Files\.BoilerplateComment\.Wrong/', $output); // Moodle sniff.
9393
$this->assertRegexp('/print_object\(\) is forbidden/', $output); // Moodle sniff.
9494
$this->assertRegexp('/FunctionUse\.RemovedFunctions\.ldap_sort/', $output); // PHPCompatibility sniff.

0 commit comments

Comments
 (0)