"""
Type "exit" to close session.
"""
+
+ Scenario: Basic session
+ Given a WP install
+ And a session file:
+ """
+ WP_ADMIN
+ $_
+ get_current_user_id()
+ $_
+ """
+
+ When I run `wp shell --quiet < session`
+ Then it should run without errors
+ And STDOUT should be:
+ """
+ true
+ true
+ 0
+ 0
+ """
$steps->Given( '/^a ([^\s]+) file:$/',
function ( $world, $path, PyStringNode $content ) {
- file_put_contents( $world->get_path( $path ), (string) $content );
+ $content = (string) $content . "\n";
+ file_put_contents( $world->get_path( $path ), $content );
}
);