From 6f614d57c605158d365bc4231dc9ac079535da6e Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Fri, 8 Mar 2024 15:54:47 +0100 Subject: [PATCH] Amend tests to check for moodle-cs v3.4.1 new sniffs --- tests/Command/CodeCheckerCommandTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Command/CodeCheckerCommandTest.php b/tests/Command/CodeCheckerCommandTest.php index 07932f85..8dca9d3d 100644 --- a/tests/Command/CodeCheckerCommandTest.php +++ b/tests/Command/CodeCheckerCommandTest.php @@ -96,10 +96,11 @@ abstract private function somefunc() { // To verify PHPCompatibility sniff. $output = $commandTester->getDisplay(); $this->assertMatchesRegularExpression('/E\.* 10\.* \/ 10 \(100%\)/', $output); // Progress. $this->assertMatchesRegularExpression('/\/fixable.php/', $output); // File. - $this->assertMatchesRegularExpression('/ 7 ERRORS AND 1 WARNING AFFECTING 7 /', $output); // Summary. + $this->assertMatchesRegularExpression('/ 8 ERRORS AND 1 WARNING AFFECTING 8 /', $output); // Summary. $this->assertMatchesRegularExpression('/moodle\.Files\.BoilerplateComment\.Wrong/', $output); // Moodle sniff. $this->assertMatchesRegularExpression('/print_error\(\) has been deprecated/', $output); // Moodle sniff. $this->assertMatchesRegularExpression('/print_object\(\) is forbidden/', $output); // Moodle sniff. + $this->assertMatchesRegularExpression('/Missing doc comment for class test/', $output); // Moodle sniff. $this->assertMatchesRegularExpression('/AbstractPrivateMethods\.Found/', $output); // PHPCompatibility sniff. $this->assertMatchesRegularExpression('/Files\.EndFileNewline\.NotFound/', $output); // End of file. $this->assertMatchesRegularExpression('/PHPCBF CAN FIX THE 3 MARKED SNIFF/', $output); // PHPCBF note.