File tree 2 files changed +5
-3
lines changed
src/Symfony/Component/Config 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ public function isFresh($timestamp)
68
68
return false ;
69
69
}
70
70
71
- if ($ timestamp <= filemtime ($ this ->resource )) {
71
+ if ($ timestamp < filemtime ($ this ->resource )) {
72
72
return false ;
73
73
}
74
74
@@ -85,7 +85,7 @@ public function isFresh($timestamp)
85
85
}
86
86
87
87
// early return if a file's mtime exceeds the passed timestamp
88
- if ($ timestamp <= $ file ->getMTime ()) {
88
+ if ($ timestamp < $ file ->getMTime ()) {
89
89
return false ;
90
90
}
91
91
}
Original file line number Diff line number Diff line change @@ -96,8 +96,10 @@ public function testIsFreshNewFileWithDifferentPattern()
96
96
public function testIsFreshDeleteFile ()
97
97
{
98
98
$ resource = new DirectoryResource ($ this ->directory );
99
+ $ time = time ();
100
+ sleep (1 );
99
101
unlink ($ this ->directory .'/tmp.xml ' );
100
- $ this ->assertFalse ($ resource ->isFresh (time () ), '->isFresh() returns false if an existing file is removed ' );
102
+ $ this ->assertFalse ($ resource ->isFresh ($ time ), '->isFresh() returns false if an existing file is removed ' );
101
103
}
102
104
103
105
public function testIsFreshDeleteDirectory ()
You can’t perform that action at this time.
0 commit comments