Re: Tests which produce fatal errors

From: Date: Thu, 24 Nov 2011 17:03:52 +0000
Subject: Re: Tests which produce fatal errors
References: 1  Groups: php.qa 
Request: Send a blank email to php-qa+get-65992@lists.php.net to get a copy of this message
On 11/24/11 7:55 AM, Clint M Priest wrote:
I'm writing new getter/setter property syntax and associated functionality and working on the test cases now. I have one test that tests that a privately over-ridden accessor is not accessible externally to the object which produces a fatal error. This is the expected result and the output is: Fatal error: Cannot get private property TimePeriod::$Hours from context '' in /opt/trunk/tests/classes/accessor_std_private_error.php on line 14 The issue here though is that it has the path to the generated test php file, which I assume I should not be putting in the expected output. What's the right way to do this? Thanks, -Clint
See http://qa.php.net/write-test.php which links to http://qa.php.net/phpt_details.php Also look at how existing tests do it. Make sure that you mask the final slash in the path before the filename; not all platforms use the same directory separator, i.e. use %saccessor_std_private_error.php where %s is the mask for the path. Chris -- Email: christopher.jones@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/

« previous php.qa (#65992) next »