phpcr/phpcr-api-tests — Issue #36: DateTime comparisons are fragile
Author: bergie
Created: 2011-11-17 13:27:16+00:00
State: open

Now with the Midgard2 PHPCR provider, we get a lot of "false negatives" thanks to the way DateTimes are compared with each other:

23) PHPCR\Tests\Writing\SetPropertyDynamicRebindingTest::testDynamicRebinding with data set #28 ('dynRebinding_Boolean_To_Date', 6, true, 5, DateTime, 'getDate')
Property value does not match after re-binding
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
DateTime Object (
'date' => '2011-11-17 13:16:57'
- 'timezone_type' => 3
- 'timezone' => 'UTC'
+ 'timezone_type' => 1
+ 'timezone' => '+00:00'
)

/home/vagrant/builds/bergie/phpcr-midgard2/api-test/suite/tests/10_Writing/SetPropertyDynamicRebindingTest.php:102
/home/vagrant/.phpfarm/inst/php-5.3.8/bin/phpunit:44