Skip to content

Commit

Permalink
Add many missing closing PHP tags to tests
Browse files Browse the repository at this point in the history
Closes GH-5958
  • Loading branch information
kocsismate committed Aug 9, 2020
1 parent 05478e9 commit 7aacc70
Show file tree
Hide file tree
Showing 1,103 changed files with 1,097 additions and 30 deletions.
1 change: 1 addition & 0 deletions Zend/tests/022.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Ext extends Base
$a = new Ext();
$a->someMethod("foo");
$a->someMethod();
?>
--EXPECT--
foo
default
1 change: 1 addition & 0 deletions Zend/tests/anon/001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ declare bare anonymous class
--FILE--
<?php
var_dump(new class{});
?>
--EXPECTF--
object(class@%s)#%d (0) {
}
1 change: 1 addition & 0 deletions Zend/tests/anon/002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ $a = new class extends A implements B {
};

var_dump($a instanceof A, $a instanceof B);
?>
--EXPECT--
bool(true)
bool(true)
1 change: 1 addition & 0 deletions Zend/tests/anon/003.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ while (@$i++<10) {
}
});
}
?>
--EXPECTF--
object(class@%s)#1 (1) {
["i"]=>
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/anon/004.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ $outer = new Outer(array(

/* not null because inheritance */
var_dump($outer->getArrayAccess()[0]);
?>
--EXPECTF--
int(%d)
1 change: 1 addition & 0 deletions Zend/tests/anon/005.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ $proxy = $outer->getArrayAccess();

/* null because no inheritance, so no access to protected member */
var_dump(@$outer->getArrayAccess()[0]);
?>
--EXPECT--
NULL
1 change: 1 addition & 0 deletions Zend/tests/anon/006.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace lone {
namespace {
var_dump ($hello);
}
?>
--EXPECTF--
object(class@%s)#1 (0) {
}
1 change: 1 addition & 0 deletions Zend/tests/anon/007.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace lone {

new Outer();
}
?>
--EXPECTF--
object(class@%s)#2 (0) {
}
1 change: 1 addition & 0 deletions Zend/tests/anon/008.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ $anonClass = new class("cats", "dogs") {

var_dump($anonClass::$foo);
var_dump($anonClass::getBar());
?>
--EXPECT--
string(4) "cats"
string(4) "dogs"
1 change: 1 addition & 0 deletions Zend/tests/anon/009.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ $anonClass = new class {
};

var_dump($anonClass->someMethod());
?>
--EXPECT--
string(3) "bar"
1 change: 1 addition & 0 deletions Zend/tests/array_unpack/basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ var_dump([...new ArrayIterator(['a', 'b', 'c'])]);
var_dump([0, ...$array, ...getArr(), 6, 7, 8, 9, 10, ...arrGen()]);
var_dump([0, ...$array, ...$array, 'end']);

?>
--EXPECT--
array(0) {
}
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/array_unpack/classes.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ try {
} catch (Error $ex) {
echo "Exception: " . $ex->getMessage() . "\n";
}
?>
--EXPECT--
array(5) {
[0]=>
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/array_unpack/non_integer_keys.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ try {
echo "Exception: " . $ex->getMessage() . "\n";
}

?>
--EXPECT--
Exception: Cannot unpack Traversable with non-integer keys
1 change: 1 addition & 0 deletions Zend/tests/array_unpack/ref1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ unset($a); //array (0 => (refcount=1, is_ref=1)=1)

var_dump([...$b]); //array (0 => (refcount=0, is_ref=0)=1)

?>
--EXPECT--
array(1) {
[0]=>
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/array_unpack/string_keys.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ try {
var_dump($ex->getMessage());
}

?>
--EXPECT--
string(36) "Cannot unpack array with string keys"
string(42) "Cannot unpack Traversable with string keys"
1 change: 1 addition & 0 deletions Zend/tests/array_unpack/undef_var.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ array unpacking with undefinded variable

var_dump([...$arr]);

?>
--EXPECTF--
Warning: Undefined variable $arr in %s on line %d

Expand Down
1 change: 1 addition & 0 deletions Zend/tests/ast/zend-pow-assign.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ assert.exception=0

assert_options(ASSERT_WARNING);
assert(false && ($a **= 2));
?>
--EXPECTF--
Warning: assert(): assert(false && ($a **= 2)) failed in %s%ezend-pow-assign.php on line %d
1 change: 1 addition & 0 deletions Zend/tests/ast_serialize_backtick_literal.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ assert.exception=0

assert_options(ASSERT_WARNING);
assert(false && `echo -n ""`);
?>
--EXPECTF--
Warning: assert(): assert(false && `echo -n ""`) failed in %s%east_serialize_backtick_literal.php on line %d
1 change: 1 addition & 0 deletions Zend/tests/attributes/007_self_reflect_attribute.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ foreach ($attributes as $attribute) {
var_dump(get_class($a));
var_dump($a->flags == Attribute::TARGET_ALL);
}
?>
--EXPECT--
string(9) "Attribute"
array(0) {
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/attributes/008_wrong_attribution.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ Attributes: Prevent Attribute on non classes

@@Attribute
function foo() {}
?>
--EXPECTF--
Fatal error: Attribute "Attribute" cannot target function (allowed targets: class) in %s
1 change: 1 addition & 0 deletions Zend/tests/attributes/016_custom_attribute_validation.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ if (!extension_loaded('zend-test')) {
@@ZendTestAttribute
function foo() {
}
?>
--EXPECTF--
Fatal error: Only classes can be marked with @@ZendTestAttribute in %s
1 change: 1 addition & 0 deletions Zend/tests/binary-32bit.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ var_dump(-0b11111111111111111111111111111111);
var_dump(-0b1111111111111111111111111111111);
var_dump(-0b111111111111111111111111111111);
var_dump(-0b1);
?>
--EXPECT--
int(1)
int(3)
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/binary.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ var_dump(-0b1111111111111111111111111111111111111111111111111111111111111111);
var_dump(-0b111111111111111111111111111111111111111111111111111111111111111);
var_dump(-0b11111111111111111111111111111111111111111111111111111111111111);
var_dump(-0b1);
?>
--EXPECT--
int(1)
int(3)
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug31177-2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ try {
} catch (Exception $e) {
var_dump($x);
}
?>
--EXPECT--
object(foo)#1 (0) {
}
1 change: 1 addition & 0 deletions Zend/tests/bug37251.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ try {
} catch (Error $e) {
echo 'OK';
}
?>
--EXPECT--
OK
1 change: 1 addition & 0 deletions Zend/tests/bug37715.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ foreach($a as $k => $d)
}
// Alternatively $c = $a; and foreachloop removal will cause identical results.
var_dump(key($a['b']));
?>
--EXPECT--
int(3)
int(3)
1 change: 1 addition & 0 deletions Zend/tests/bug38772.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ $a = new A();
$b = new B();
$c = new C();
$d = new D();
?>
--EXPECT--
A::foo
A::foo
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug40509.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ foreach ($arr["v"] as $k => $v) {
var_dump($k);
}
var_dump(key($arr["v"]));
?>
--EXPECT--
int(0)
int(0)
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug40705.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ foreach ($foo as $k => $v) {
var_dump($k);
}
var_dump(key($foo));
?>
--EXPECT--
int(0)
int(0)
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug41401.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Bug #41401 (wrong precedence for unary minus)
echo 1/-2*5;
echo "\n";
echo 6/+2*-3;
?>
--EXPECT--
-2.5
-9
1 change: 1 addition & 0 deletions Zend/tests/bug41640.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class foo {
}

var_dump(get_class_vars("foo"));
?>
--EXPECT--
array(1) {
["x"]=>
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug42211.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ $a = new A();
$a->foo();
$b = new B();
$b->foo();
?>
--EXPECT--
bool(true)
bool(true)
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug42798.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ function foo($c = ok::constant) {
}

foo();
?>
--EXPECT--
ok
1 change: 1 addition & 0 deletions Zend/tests/bug42802.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ test2($x);
test3($x);
test4($y);
test5($x);
?>
--EXPECTF--
ok
ok
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug42820.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var_dump(defined('\\ns\\foo::ok'));
var_dump(defined('\\ns\\foo::bug'));
var_dump(defined('ns\\bar::bug'));
var_dump(defined('\\ns\\bar::bug'));
?>
--EXPECT--
bool(true)
bool(false)
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug43183.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ class Foo {}
class Bar {}
use Test\Bar;
echo "ok\n";
?>
--EXPECT--
ok
1 change: 1 addition & 0 deletions Zend/tests/bug43332_1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class foo {
$foo = new foo;
$foo->bar($foo); // Ok!
$foo->bar(new \stdclass); // Error, ok!
?>
--EXPECTF--
Fatal error: Uncaught TypeError: foobar\foo::bar(): Argument #1 ($a) must be of type foobar\foo, stdClass given, called in %s:%d
Stack trace:
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug43332_2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ class foo {
$foo = new foo;
$foo->bar($foo); // Ok!
$foo->bar(new stdclass); // Error, ok!
?>
--EXPECTF--
Fatal error: '\self' is an invalid class name in %sbug43332_2.php on line 5
1 change: 1 addition & 0 deletions Zend/tests/bug43651.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var_dump(is_callable("Test::foo"));
var_dump(is_callable("\\Test::foo"));
var_dump(is_callable("is_string"));
var_dump(is_callable("\\is_string"));
?>
--EXPECT--
bool(false)
bool(false)
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug44141.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Y extends X

$y = Y::cheat(5);
echo $y->x, PHP_EOL;
?>
--EXPECTF--
Fatal error: Uncaught Error: Call to private X::__construct() from scope Y in %s:%d
Stack trace:
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug45744.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class Bar2 extends Foo2 {
}

new Bar2(array());
?>
--EXPECT--
array(0) {
}
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug49866.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ $a = "string";
$b = &$a[1];
$b = "f";
echo $a;
?>
--EXPECTF--
Fatal error: Uncaught Error: Cannot create references to/from string offsets in %sbug49866.php:3
Stack trace:
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug50394.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ $proxy = new Proxy;
call_user_func_array( array( $proxy, 'bar' ), $args );
call_user_func_array( array( $proxy, 'bar' ), array(&$arg) );
var_dump($arg);
?>
--EXPECT--
bar called!
bar called!
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug50816.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var_dump($mapWithoutConst0[1]);
var_dump($mapWithoutConst1[1]);
var_dump($mapWithoutConst2[1]);
var_dump($mapWithoutConst3[1]);
?>
--EXPECT--
string(3) "two"
string(3) "two"
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug51394.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function eh()

set_error_handler("eh");
$a = $empty($b);
?>
--EXPECTF--
Fatal error: Uncaught Exception: error! in %sbug51394.php:%d
Stack trace:
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug52614.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ $foo->f1()[0]++;
var_dump($foo->a1[0]);
$foo->f6()[0]++;
var_dump($foo->a1[0]);
?>
--EXPECT--
NULL
array(0) {
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug52879.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ $myGlobal=new MyClass();
$myGlobal->myRef=&$myGlobal;
$myGlobal->myNonExistentProperty="ok\n";
echo $myGlobal;
?>
--EXPECT--
ok
1 change: 1 addition & 0 deletions Zend/tests/bug53511.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function test() {

test();
echo "bug\n";
?>
--EXPECTF--
Fatal error: Uncaught Exception: ops 1 in %sbug53511.php:4
Stack trace:
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug53727.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ echo (defined('ChildClass::TEST_CONSTANT') ? 'true' : 'false') . "\n";

echo (is_subclass_of('ParentClass', 'MyInterface') ? 'true' : 'false') . "\n";
echo (defined('ParentClass::TEST_CONSTANT') ? 'true' : 'false') . "\n";
?>
--EXPECT--
true
true
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug54039.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function test_3() {
}
$f = test_3(); $f();
$f = test_3(); $f();
?>
--EXPECT--
Outer function increments $v to 1
Inner function reckons $v is 1
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug54268.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ class Test
}
$x = new Test();
Test::$mystatic = new DestructorCreator();
?>
--EXPECTF--
Fatal error: Allowed memory size of %s bytes exhausted%s(tried to allocate %s bytes) in %s on line %d

0 comments on commit 7aacc70

Please sign in to comment.