Hi all,
>> I agree with Michael.
>>
>> Even 1&1 and some other hoster does not provide 5.3 support
>> yet. Of course, testing is not really necessary for production
>> environment... but who knows what people out there are doing?
>>
>> And really I *wished* it would be different - I think at
>> namespaces.
>
> The adoption of PHP 5.3 is really going slowly, and that is
> slowly starting to be a serious issue. PHP 5.2 has reached end
> of support in Dec 2010. That's close to a year ago now.
this is true, we should face the facts.
> My point is that some 5.3. features allow for much better unit
> tests. Frankly, I'm not sure how to test option parsing for the
> syslog appender using 5.2 without redesigning it in a way which
> allows me to "peek" at some private member variables (for
> example making the option parsing methods public). And that is
> just not very good design...
>
> For some appender params it's easy to test. E.g. file
> appender's "filename" parameter - just check if a file was
> created at the right place. But syslog appender is specific, I
> cannot easily read the syslog entry created by the appender
> (especially in a way which would work on all platforms) to see
> if the options were activated correctly.
>
> I still think it is better to use PHP 5.3 features where no
> other approach gives good results. This means that people
> testing on PHP 5.2 will have some skipped tests. Testing will
> NOT fail on 5.2. Currently, they will also have skipped tests if
> they don't have pdo_sqlite3 or mongodb extensions loaded (and a
> mongodb server up and running).
Ok, I understand your point. Although I think your sqlite3/mongodb
argument addresses a slightly different case, I could live with test
relying on PHP 5.3 tests to be skipped.
Michael.