PHP Class Tests\Wallabag\CoreBundle\WallabagCoreTestCase

Inheritance: extends Symfony\Bundle\FrameworkBundle\Test\WebTestCase
Show file Open project: wallabag/wallabag Class Usage Examples

Public Methods

Method Description
getClient ( )
getLoggedInUserId ( ) : integer Return the user id of the logged in user.
logInAs ( string $username ) Login a user without making a HTTP request.
logInAsUsingHttp ( string $username ) Instead of logInAs this method use a HTTP request to log in the user.
setUp ( )

Protected Methods

Method Description
checkRedis ( ) Check if Redis is installed.

Method Details

checkRedis() protected method

If not, mark test as skip.
protected checkRedis ( )

getClient() public method

public getClient ( )

getLoggedInUserId() public method

You should be sure that you called logInAs before.
public getLoggedInUserId ( ) : integer
return integer

logInAs() public method

If we make a HTTP request we lose ability to mock service in the container.
public logInAs ( string $username )
$username string User to log in

logInAsUsingHttp() public method

Could be better for some tests.
public logInAsUsingHttp ( string $username )
$username string User to log in

setUp() public method

public setUp ( )