Skip to content

Commit

Permalink
test renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Hidanio committed Dec 18, 2024
1 parent d6700d6 commit d03b0ac
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/tests/checkers/linter_suppress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function g($b) {
test.RunAndMatch()
}

func TestLinterSuppressInsideFunction(t *testing.T) {
func TestLinterSuppressDNRInsideFunction(t *testing.T) {
rfile := `<?php
/**
* @name emptyIf
Expand All @@ -172,7 +172,7 @@ function f() {
test.RunRulesTest()
}

func TestLinterSuppressBehindFunction(t *testing.T) {
func TestLinterSuppressDNRBehindFunction(t *testing.T) {
rfile := `<?php
/**
* @name emptyIf
Expand All @@ -196,8 +196,18 @@ function f() {
test.RunRulesTest()
}

func TestLinterSuppressMethod(t *testing.T) {
func TestLinterSuppressDNRMethod(t *testing.T) {
rfile := `<?php
/**
* @name emptyIf
* @warning suspicious empty body of the if statement
* @scope local
*/
if ($_);
`

test := linttest.NewSuite(t)
test.RuleFile = rfile
test.AddFile(`<?php
class Foo {
/**
Expand Down

0 comments on commit d03b0ac

Please sign in to comment.