File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,24 @@ class ITEnv {
1010
1111 final private function __construct () { }
1212
13+ /**
14+ * Return directory used for adding test content
15+ * files.
16+ */
17+ public static function getTestContentDir (): string {
18+ $ dir = self ::getWordPressDir () . self ::getTestContentPath ();
19+ mkdir ( $ dir , 0777 , true );
20+ return $ dir ;
21+ }
22+
23+ /**
24+ * Return relative URL path where test content files
25+ * should appear on the site.
26+ */
27+ public static function getTestContentPath (): string {
28+ return '/wp-content/tstcontent ' ;
29+ }
30+
1331 public static function getWordPressDir (): string
1432 {
1533 if ( ! isset ( self ::$ wordpress_dir ) ) {
Original file line number Diff line number Diff line change 77 */
88trait ITTrait {
99 public function setUp (): void {
10+ exec ( 'rm -rf ' . escapeshellarg ( ITEnv::getTestContentDir () ) );
11+
1012 $ this ->wpCli ( [ 'wp2static ' , 'delete_all_cache ' , '--force ' ] );
1113 }
1214
You can’t perform that action at this time.
0 commit comments