isMike()
Forum Replies Created
-
I also got frustrated trying to fix this error. For anyone who can’t run tests because your WordPress isn’t installing, I will advise you to try these steps. Hopefully it works for you.
1. Using windows explorer (NOT COMMAND LINE), navigate to C:\Users\{your_username}\AppData\Local\Temp. Right in the Temp folder, check if there is a folder named wordpress-tests-lib. If this folder exists, then it means you are good to go (in fact you should see the wp-tests-config.php and two other folders within that directory). Now go to step 2.
2. Navigate into the wordpress-test-lib folder, then create another folder called tmp.
3. Download the latest WordPress zip file from www.remarpro.com. place the zip folder in the newly created tmp folder and extract the content of this zip file into this directory. (Note: if you are using the WINRAR windows app, please do not use the ?xtract to wordpress-version option. Instead use the Extract here option).
4. Now, check to be sure your core WordPress folders(wp-admin, wp-include, e.t.c) and core wordpress files are now in C:\Users\{your_username}\AppData\Local\Temp\wordpress-tests-lib\tmp\wordpress.
5. If 1 – 4 is in place, Now open your wp-tests-config.php file in an editor, and adjust the constant ABSPATH defined in line 7. change the line from
define( 'ABSPATH', '/tmp/wordpress/' );
todefine( 'ABSPATH', 'tmp/wordpress/' );
(i.e remove the first forward slash) and save the file.6. Everything should be okay now. Well…except you have not installed PHPUnit. You can use composer to install that and all should be good.
I really hope this helps someone. Please feel free to ask any questions if any part of these steps is not clear to you. Thanks.