Skip to content

Loading…

Fix another randomly failing test. #718

Merged
merged 1 commit into from

2 participants

@jails
Union of RAD member

No description provided.

@nateabele nateabele merged commit 82ab293 into UnionOfRAD:dev

1 check passed

Details default The Travis build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 9, 2012
  1. @jails
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +3 −2 tests/cases/data/entity/DocumentTest.php
View
5 tests/cases/data/entity/DocumentTest.php
@@ -812,13 +812,14 @@ public function testModifiedExport() {
public function testArrayConversion() {
$this->skipIf(!MongoDb::enabled(), "MongoDB not enabled, skipping conversion tests.");
+ $time = time();
$doc = new Document(array('data' => array(
'_id' => new MongoId(),
- 'date' => new MongoDate()
+ 'date' => new MongoDate($time)
)));
$result = $doc->data();
$this->assertPattern('/^[a-f0-9]{24}$/', $result['_id']);
- $this->assertEqual(time(), $result['date']);
+ $this->assertEqual($time, $result['date']);
}
public function testArrayInterface() {
Something went wrong with that request. Please try again.