File tree Expand file tree Collapse file tree
integration-tests/test/wp2static_test Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66(defn get-crawled-file [path]
77 (slurp (str " wordpress/wp-content/uploads/wp2static-crawled-site/" path)))
88
9- (deftest test-crawled-site
10- (test/with-test-system [_]
11- (test/wp-cli! {} " wp2static" " detect" )
12- (test/wp-cli! {} " wp2static" " crawl" )
13- (is (str/includes? (get-crawled-file " index.html" ) " Welcome to WordPress" ))
14- (is (str/includes? (get-crawled-file " robots.txt" ) " Sitemap: http://localhost:7000/wp-sitemap.xml" ))))
15-
169(deftest test-basic-auth
1710 (let [opts {:sh-opts [:env {" HTTP_HOST" " localhost:7002" }]}]
1811 (test/with-test-system [_]
Original file line number Diff line number Diff line change @@ -14,7 +14,12 @@ public function testIndexCrawl(): void
1414 $ this ->wpCli ( [ 'wp2static ' , 'crawl ' ] );
1515
1616 $ content = $ this ->getCrawledFileContents ( 'index.html ' );
17-
1817 $ this ->assertStringContainsString ( 'Welcome to WordPress ' , $ content );
18+
19+ $ content = $ this ->getCrawledFileContents ( 'robots.txt ' );
20+ $ this ->assertStringContainsString (
21+ 'Sitemap: http://localhost:8888/wp-sitemap.xml ' ,
22+ $ content
23+ );
1924 }
2025}
You can’t perform that action at this time.
0 commit comments