features/bootstrap/UserSwitchingContext.php
public function switch_to_user( $user_id ) {
		$user_id = $this->getUserIdFromLogin( $user_id );

		PHPUnit_Framework_Assert::assertNotEmpty( $user_id );

		$this->visitPath( sprintf( 'wp-admin/user-edit.php?user_id=%d', $user_id ) );
		$this->getSession()->getPage()->clickLink( "Switch\xc2\xa0To" );
	}
public function switch_to_user( $user_id ) {
		$user_id = $this->getUserIdFromLogin( $user_id );

		PHPUnit_Framework_Assert::assertNotEmpty( $user_id );

		$this->visitPath( sprintf( 'wp-admin/user-edit.php?user_id=%d', $user_id ) );
		$this->getSession()->getPage()->clickLink( "Switch\xc2\xa0To" );
	}
public function switch_to_user ( $ user_id ) { $ user_id = $ this -> getUserIdFromLogin ( $ user_id ) ; PHPUnit_Framework_Assert :: assertNotEmpty ( $ user_id ) ; $ this -> visitPath ( sprintf ( 'wp-admin/user-edit.php?user_id=%d' , $ user_id ) ) ; $ this -> getSession ( ) -> getPage ( ) -> clickLink ( "Switch\xc2\xa0To" ) ; }
Switch to the specified user

@param string $user_id

@When /^(?:|I )switch to user "(?P<user_id>[^"]+)"$/
Switch to the specified user