You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
}, Tester\AssertException::class, 'E_WARNING was expected, but E_NOTICE (Undefined variable: a) was generated in file %a% on line %d%');
54
+
}, Tester\AssertException::class, 'E_WARNING was expected, but E_NOTICE (Only variables should be assigned by reference) was generated in file %a% on line %d%');
55
55
56
56
Assert::exception(function () {
57
57
Assert::error(function () {
58
-
$a++;
58
+
$a = &pi();
59
59
}, E_NOTICE, 'Abc');
60
-
}, Tester\AssertException::class, "E_NOTICE with a message matching 'Abc' was expected but got 'Undefined variable: a'");
60
+
}, Tester\AssertException::class, "E_NOTICE with a message matching 'Abc' was expected but got 'Only variables should be assigned by reference'");
61
61
62
62
Assert::exception(function () {
63
63
Assert::error(function () {
64
-
$a++;
65
-
$b++;
66
-
}, E_NOTICE, 'Undefined variable: a');
67
-
}, Tester\AssertException::class, 'Generated more errors than expected: E_NOTICE (Undefined variable: b) was generated in file %a% on line %d%');
64
+
$a = &pi();
65
+
$a = &pi();
66
+
}, E_NOTICE, 'Only variables should be assigned by reference');
67
+
}, Tester\AssertException::class, 'Generated more errors than expected: E_NOTICE (Only variables should be assigned by reference) was generated in file %a% on line %d%');
68
68
69
69
Assert::exception(function () {
70
70
Assert::error(function () {
71
-
$a++;
71
+
$a = &pi();
72
72
}, [
73
-
[E_NOTICE, 'Undefined variable: a'],
74
-
[E_NOTICE, 'Undefined variable: b'],
73
+
[E_NOTICE, 'Only variables should be assigned by reference'],
74
+
[E_NOTICE, 'Only variables should be assigned by reference'],
75
75
]);
76
76
}, Tester\AssertException::class, 'Error was expected, but was not generated');
}, Tester\AssertException::class, 'E_WARNING was expected, but E_NOTICE (Undefined variable: a) was generated in %a%testBadError()');
145
+
}, Tester\AssertException::class, 'E_WARNING was expected, but E_NOTICE (Only variables should be assigned by reference) was generated in %a%testBadError()');
146
146
147
147
Assert::exception(function () use ($test) {
148
148
$test->runTest('testNoticeBadMessage');
149
-
}, Tester\AssertException::class, "E_NOTICE with a message matching 'With message' was expected but got 'Undefined variable: a' in testNoticeBadMessage()");
149
+
}, Tester\AssertException::class, "E_NOTICE with a message matching 'With message' was expected but got 'Only variables should be assigned by reference' in testNoticeBadMessage()");
0 commit comments