diff --git a/example/custom/custom_test.go b/example/custom/custom_test.go
index 08c601c93..3b2e5e41b 100644
--- a/example/custom/custom_test.go
+++ b/example/custom/custom_test.go
@@ -11,7 +11,7 @@ func TestAssignmentAsExpression(t *testing.T) {
addCheckers(test.Config())
test.AddFile(`func2()->func3();
func TestAnonClassWithConstructor(t *testing.T) {
linttest.SimpleNegativeTest(t, ` $v) {
$_ = [$k, $v];
@@ -188,7 +188,7 @@ $_ = [$x]; // Bad
func TestForeachSimplify(t *testing.T) {
test := linttest.NewSuite(t)
test.AddFile(` $y];
}
@@ -613,7 +613,7 @@ foreach ([[1, 2, 3, 4]] as list($x, $y,,$z)) {
func TestArgsCount(t *testing.T) {
test := linttest.NewSuite(t)
test.AddFile(` 1, "\xa" => 2];
`)
test.Expect = []string{`Duplicate array key "\n"`}
@@ -1386,7 +1386,7 @@ $_ = ["\n" => 1, "\xa" => 2];
func TestDuplicateArrayKeyGood(t *testing.T) {
linttest.SimpleNegativeTest(t, ` 1,
"'" => 1,
@@ -1397,7 +1397,7 @@ $valid_quotes = [
func TestDuplicateArrayKey(t *testing.T) {
test := linttest.NewSuite(t)
test.AddFile(` 'something',
@@ -1413,7 +1413,7 @@ function test() {
func TestDuplicateArrayKeyWithBoolConstants(t *testing.T) {
test := linttest.NewSuite(t)
test.AddFile(` 1, true => 2];
func TestDuplicateArrayKeyWithConstants(t *testing.T) {
test := linttest.NewSuite(t)
test.AddFile(`loadHTML('field = $x; }
@@ -46,7 +46,7 @@ echo $v->field;
func TestIndexingOrderTraits(t *testing.T) {
test := linttest.NewSuite(t)
test.AddNamedFile("/foo/A.php", `field = $x; }
@@ -80,13 +80,13 @@ echo $v->field;
func TestIndexingOrderFuncs(t *testing.T) {
test := linttest.NewSuite(t)
test.AddNamedFile("/foo/A.php", `acceptThis($foo);
func TestMagicGetChaining(t *testing.T) {
linttest.SimpleNegativeTest(t, `foo->bar->method();
func TestNonPublicMagicMethods(t *testing.T) {
test := linttest.NewSuite(t)
test.AddFile(`create() as $item) {
func TestDerivedLateStaticBinding(t *testing.T) {
linttest.SimpleNegativeTest(t, `onlyInDerived();
func TestStaticResolutionInsideSameClass(t *testing.T) {
test := linttest.NewSuite(t)
test.AddFile(`name();
@@ -1030,7 +1030,7 @@ function fn4($f4) {
func TestInstanceOfElseif1(t *testing.T) {
linttest.SimpleNegativeTest(t, `[0-9])~', $s);
preg_match('~(?[0-9])~', $s);
@@ -28,7 +28,7 @@ func TestRESimplifyMixed(t *testing.T) {
test := linttest.NewSuite(t)
test.LoadStubs = []string{`stubs/phpstorm-stubs/pcre/pcre.php`}
test.AddFile(` x
function ungroup($s) {
preg_match('/(?:x)/', $s);
@@ -149,7 +149,7 @@ func TestRESimplifyChangeDelim(t *testing.T) {
test := linttest.NewSuite(t)
test.LoadStubs = []string{`stubs/phpstorm-stubs/pcre/pcre.php`}
test.AddFile(`good6['y']->value;
func TestShapeReturn(t *testing.T) {
linttest.SimpleNegativeTest(t, `next->next;
func TestTuple(t *testing.T) {
linttest.SimpleNegativeTest(t, `', 'a', 'A']);
}
@@ -42,7 +42,7 @@ func TestStripTagsString1(t *testing.T) {
test := linttest.NewSuite(t)
test.LoadStubs = []string{"stubs/phpstorm-stubs/standard/standard_1.php"}
test.AddFile(`');
}
@@ -61,7 +61,7 @@ func TestStripTagsString2(t *testing.T) {
test := linttest.NewSuite(t)
test.LoadStubs = []string{"stubs/phpstorm-stubs/standard/standard_1.php"}
test.AddFile(`
');
}
diff --git a/src/tests/checkers/trait_test.go b/src/tests/checkers/trait_test.go
index 0b2664391..167d820bf 100644
--- a/src/tests/checkers/trait_test.go
+++ b/src/tests/checkers/trait_test.go
@@ -9,7 +9,7 @@ import (
func TestTraitSingleton(t *testing.T) {
// See #533.
linttest.SimpleNegativeTest(t, ` 1, 'b' => 2, 'c' => 3];
if (array_key_exists('z', $array)) { // 2
diff --git a/src/tests/golden/testdata/quickfix/complexExamples.php.fix.expected b/src/tests/golden/testdata/quickfix/complexExamples.php.fix.expected
index 15e87f4c4..3ed4c9e56 100644
--- a/src/tests/golden/testdata/quickfix/complexExamples.php.fix.expected
+++ b/src/tests/golden/testdata/quickfix/complexExamples.php.fix.expected
@@ -1,6 +1,6 @@
sum(); // actual PHP prints 6
func TestIssue209_2(t *testing.T) {
test := linttest.NewSuite(t)
test.AddFile(` 1, "\n" => 2];
`)
}
diff --git a/src/tests/regression/issue6_test.go b/src/tests/regression/issue6_test.go
index e077b8f88..128505fae 100644
--- a/src/tests/regression/issue6_test.go
+++ b/src/tests/regression/issue6_test.go
@@ -8,8 +8,8 @@ import (
func TestIssue6(t *testing.T) {
linttest.SimpleNegativeTest(t, `