(on Sunday, 20 July 2008, 03:58 PM +0200):
> Matthew Weier O'Phinney a écrit :
> > -- mikaelkael <perraud.mickael@orange.fr> wrote
> > (on Sunday, 20 July 2008, 11:40 AM +0200):
> >
> > > When I realize a suite of test with generating of coverage report
> > > ('phpunit --verbose --coverage-html ./rapport AllTests'), I have an
> > > exception in method __set() of Zend_Test_PHPUnit_ControllerTestCase.
> > > I need to disable the 2 tests (not simply one) in the function to be
> > > able to have my report.
> > >
> > > I use:
> > > - ZF (SVN 10221)
> > > - PHPUnit 3.2.21
> > > - error_reporting(E_ALL)
> > >
> > > For the first test, I haven't any information just a break of the program.
> > >
> > > For the second test, I have for example "Zend_Exception: Overloading
> > > of non-public properties is prohibited" with $name='__liHtml'.
> > >
> >
> > I've modified the logic to allow properties beginning with double
> > underscores to be set (see r10242).
> >
> It's OK for the second test.
> The break comes when I use external PHP code (PEAR/HTML_QuickForm) in
> one particular case (???).
> I have multiple form but just one (login form) causes the break. I have
> no information (even with E_ALL | E_STRICT)
> As my goal was to change for Zend_Form...
So, the goal with overloading was to allow easy access to the request,
response, and front controller objects while still requiring using
the accessors. The issue, of course, is if private/protected members are
accessed this way, you can run into issues. If we proxy indiscriminately
to them, we allow the potential of setting private/protected members
from a public scope, which could lead to disastrous results. If we don't
proxy to them at all, we then run into issues where private/protected
methods that need access to them cannot. (Remember, though, all of this
is within the scope of the unit test case, no more and no less.)
I'm tempted to remove the proxying via overloading, but this will
require a pretty significant change to the documentation and workflow.
Can you provide a use case, as minimal as you can, that runs into this
error? I don't care if it has dependencies on external libraries -- I
just want to dig into it and see what the issues may be.
--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/
没有评论:
发表评论