Skip to content

Commit f653f5b

Browse files
committed
Fix tests to match the new EOL @ EOF detection abilities
1 parent 0e32540 commit f653f5b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/Command/CodeCheckerCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function testExecuteFail()
7676
} elseif (false) {
7777
$var = print_object(); // To verify moodle own sniff.
7878
79-
}
79+
} // No EOL @ EOF on purpose to verify it's detected.
8080
EOT;
8181
$this->fs->dumpFile($this->pluginDir.'/fixable.php', $content);
8282

@@ -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 2 WARNINGS AFFECTING 5 /', $output); // Summary (php70 shows one less)
91+
$this->assertRegExp('/ (4|5) ERRORS AND 2 WARNINGS AFFECTING 6 /', $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.

tests/Fixture/moodle-local_ci/classes/math.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ public function add($a, $b) {
4545
// Let's add them.
4646
return $a + $b;
4747
}
48-
}
48+
}

tests/Fixture/moodle-local_ci/tests/lib_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ public function test_local_ci_math_class() {
7373
$this->assertEquals(2, $math->add(4, -2));
7474
$this->assertEquals(0, $math->add(-4, 4));
7575
}
76-
}
76+
}

0 commit comments

Comments
 (0)