Skip to content

Commit 45f0154

Browse files
committed
Test that custom files get detected
1 parent 33374d5 commit 45f0154

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/integration/DetectTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,22 @@ public function testCount(): void {
1515
$this->assertGreaterThan( 1000, $count );
1616
}
1717

18+
/**
19+
* Test that the crawl queue list includes
20+
* content that we added.
21+
*/
22+
public function testIncludesAddedContent(): void {
23+
$dir = ITEnv::getTestContentDir();
24+
file_put_contents( $dir . '/new-content.html', 'New Content' );
25+
26+
$this->wpCli( [ 'wp2static', 'detect' ] );
27+
$lines = $this->wpCli( [ 'wp2static', 'crawl_queue', 'list' ] )['output'];
28+
$this->assertContains(
29+
ITEnv::getTestContentPath() . '/new-content.html',
30+
$lines
31+
);
32+
}
33+
1834
/**
1935
* Test that the crawl queue list contains expected URL
2036
*/

0 commit comments

Comments
 (0)