new test

From: Date: Wed, 20 Jun 2012 19:53:53 +0000
Subject: new test
Groups: php.qa 
Request: Send a blank email to php-qa+get-66647@lists.php.net to get a copy of this message
Hi, I've created a new test for class_exists, variation 4, see attachment. Could you take a look at it if this a the way it should be? How should I proceed to get the test accepted and added to the suite? Thanks, Erwin

--TEST-- Test class_exists() function : tests a namespaced class --FILE-- <?php /* Prototype : proto bool class_exists(string classname [, bool autoload]) * Description: Checks if the class exists using namespaces */ namespace Bar { echo "*** Testing class_exists() : namespace functionality ***\n"; class Baz {} } namespace Foodoo { use Bar; class Foo {} echo "Calling class_exists() with fully qualified name of class defined within same namespace:\n"; var_dump( class_exists('Foodoo\Foo') ); echo "Calling class_exists() on class defined within same namespace:\n"; var_dump( class_exists('Foo') ); echo "Calling class_exists() with fully qualified name of class defined in another namespace:\n"; var_dump( class_exists('Bar\Baz') ); echo "Calling class_exists() on class defined in another namespace:\n"; var_dump( class_exists('Baz') ); echo "Done"; } ?> --EXPECTF-- *** Testing class_exists() : namespace functionality *** Calling class_exists() with fully qualified name of class defined within same namespace: bool(true) Calling class_exists() on class defined within same namespace: bool(false) Calling class_exists() with fully qualified name of class defined in another namespace: bool(true) Calling class_exists() on class defined in another namespace: bool(false) Done
« previous php.qa (#66647) next »