com php-src: Add test verifying chained method invocations: Zend/tests/methods-on-non-objects-chain.phpt

From: Date: Sun, 20 Apr 2014 10:47:18 +0000
Subject: com php-src: Add test verifying chained method invocations: Zend/tests/methods-on-non-objects-chain.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82150@lists.php.net to get a copy of this message
Commit: a86e7621666bce5dcf5ac3304b2384b254319025 Author: Timm Friebe <thekid@thekid.de> Sun, 20 Apr 2014 12:47:18 +0200 Parents: 51a5e184335373e0bcfd6c65fdb22c6908768a83 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a86e7621666bce5dcf5ac3304b2384b254319025 Log: Add test verifying chained method invocations Changed paths: A Zend/tests/methods-on-non-objects-chain.phpt Diff: diff --git a/Zend/tests/methods-on-non-objects-chain.phpt b/Zend/tests/methods-on-non-objects-chain.phpt new file mode 100644 index 0000000..0f29946 --- /dev/null +++ b/Zend/tests/methods-on-non-objects-chain.phpt @@ -0,0 +1,22 @@ +--TEST-- +Catch chained method calls on non-objects raise recoverable errors +--FILE-- +<?php +set_error_handler(function($code, $message) { + var_dump($code, $message); +}); + +$x= null; +var_dump($x->method()->chained()->invocations()); +echo "Alive\n"; +?> +--EXPECTF-- + +int(4096) +string(%d) "Call to a member function method() on a non-object" +int(4096) +string(%d) "Call to a member function chained() on a non-object" +int(4096) +string(%d) "Call to a member function invocations() on a non-object" +NULL +Alive

« previous php.cvs (#82150) next »