Skip to content

Commit 961952d

Browse files
fix assertion inconsistencies
1 parent 928e919 commit 961952d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/CollectionItemTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,10 @@ public function collection_item_page_metadata_contains_modified_time()
240240

241241
$this->buildSite($files, $config, $pretty = true);
242242

243-
$this->assertEquals(
243+
$this->assertEqualsWithDelta(
244244
$files->getChild('build/collection/page/index.html')->filemtime(),
245245
$this->clean($files->getChild('build/collection/page/index.html')->getContent()),
246+
1, // allow mtimes to be within 1 second difference
246247
);
247248
}
248249
}

tests/SiteBuilderTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,10 @@ public function page_metadata_contains_source_file_modified_time()
109109
$files = $this->setupSource(['page.blade.php' => '{{ $page->getModifiedTime() }}']);
110110
$this->buildSite($files, [], $pretty = true);
111111

112-
$this->assertEquals(
112+
$this->assertEqualsWithDelta(
113113
$files->getChild('build/page/index.html')->filemtime(),
114114
$this->clean($files->getChild('build/page/index.html')->getContent()),
115+
1, // allow mtimes to be within 1 second difference
115116
);
116117
}
117118

0 commit comments

Comments
 (0)