features/bootstrap/UserSwitchingContext.php
public function logged_in_as( $user_id ) {
		$display_name = $this->getUserDataFromUsername( 'display_name', $user_id );

		PHPUnit_Framework_Assert::assertNotEmpty( $display_name );

		$this->visitPath( '/' );

		PHPUnit_Framework_Assert::assertTrue( $this->getSession()->getPage()->hasContent( sprintf( 'Howdy, %s', $display_name ) ) );
	}
public function logged_in_as( $user_id ) {
		$display_name = $this->getUserDataFromUsername( 'display_name', $user_id );

		PHPUnit_Framework_Assert::assertNotEmpty( $display_name );

		$this->visitPath( '/' );

		PHPUnit_Framework_Assert::assertTrue( $this->getSession()->getPage()->hasContent( sprintf( 'Howdy, %s', $display_name ) ) );
	}
public function logged_in_as ( $ user_id ) { $ display_name = $ this -> getUserDataFromUsername ( 'display_name' , $ user_id ) ; PHPUnit_Framework_Assert :: assertNotEmpty ( $ display_name ) ; $ this -> visitPath ( '/' ) ; PHPUnit_Framework_Assert :: assertTrue ( $ this -> getSession ( ) -> getPage ( ) -> hasContent ( sprintf ( 'Howdy, %s' , $ display_name ) ) ) ; }
Verify that the user is logged in as the specified user

@param string $user_id

@Then /^(?:|I )should be logged in as [user ]?"(?P<user_id>[^"]+)"$/
Verify that the user is logged in as the specified user