Skip to content

Commit

Permalink
#89 Makes sure ABSPATH points to wordpress setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
amostajo committed Oct 5, 2020
1 parent 2a06883 commit ede49db
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Traits/SetupTestsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ public function setupTests()
}
// Copy file
$config = file_get_contents( $filename );
$config = str_replace('define( \'ABSPATH\', \'/\')', 'define( \'ABSPATH\', dirname( __FILE__ ) . \'/\')', $config );
$config = str_replace('\'ABSPATH\', \'/\'', '\'ABSPATH\', dirname( __FILE__ ) . \'/\'', $config );
$config = str_replace('\'ABSPATH\', \'/tmp/wordpress/\'', '\'ABSPATH\', dirname( __FILE__ ) . \'/\'', $config );
$this->_lineBreak();
if ($this->getYesInput('Would you like to configure the database connection?')) {
$this->_print('Enter the database host:');
Expand Down

0 comments on commit ede49db

Please sign in to comment.