Skip to content

Commit 0acf3a3

Browse files
committed
remove invalid assumption about creation date coming from fixtures, cleanup test code a bit
1 parent 6b25736 commit 0acf3a3

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

tests/05_Reading/PropertyReadMethodsTest.php

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,35 @@
1414
*/
1515
class PropertyReadMethodsTest extends \PHPCR\Test\BaseCase
1616
{
17+
/**
18+
* @var \PHPCR\PropertyInterface
19+
*/
1720
protected $rootNode;
21+
22+
/**
23+
* @var \PHPCR\PropertyInterface
24+
*/
1825
protected $node;
19-
protected $property;
20-
protected $multiProperty;
26+
27+
/**
28+
* @var \PHPCR\PropertyInterface
29+
*/
30+
protected $createdProperty;
31+
32+
/**
33+
* @var \PHPCR\PropertyInterface
34+
*/
35+
protected $dateProperty;
36+
37+
/**
38+
* @var \PHPCR\PropertyInterface
39+
*/
40+
protected $valProperty;
41+
42+
/**
43+
* @var \PHPCR\PropertyInterface
44+
*/
45+
protected $multiValueProperty;
2146

2247
public function setUp()
2348
{
@@ -135,9 +160,7 @@ public function testJcrCreated()
135160
{
136161
$date = $this->createdProperty->getDate();
137162
$this->assertInstanceOf('DateTime', $date);
138-
$diff = time() - $date->getTimestamp();
139-
// allow the tests to need 10 minutes to run, this should be plenty
140-
$this->assertTrue($diff < 60*10, "jcr:created should be current date as fixture was just imported: ".$date->format('c'));
163+
// we can not assume a specific age here, as the fixtures might be anything
141164
}
142165

143166
public function testGetStringMulti()

0 commit comments

Comments
 (0)