PHP Class seregazhuk\tests\Bot\RequestTest

Inheritance: extends PHPUnit_Framework_TestCas\PHPUnit_Framework_TestCase, use trait seregazhuk\tests\helpers\ReflectionHelper, use trait seregazhuk\tests\helpers\ResponseHelper, use trait seregazhuk\tests\helpers\CookiesHelper
Show file Open project: seregazhuk/php-pinterest-bot

Public Methods

Method Description
it_should_clear_token_and_login_status_after_logout ( )
it_should_create_pinterest_request_object_with_bookmarks ( )
it_should_create_pinterest_request_object_with_data ( )
it_should_create_post_data_for_upload ( )
it_should_create_simple_pinterest_request_object ( )
it_should_load_cookies_from_previously_saved_session_on_auto_login ( )
it_should_return_false_on_auto_login_when_auth_cookie_not_found ( )
it_should_return_logged_in_status ( )
it_should_return_true_on_auto_login_when_auth_cookie_exist ( )
it_should_set_csrf_token_to_default_value_after_clear ( )
it_should_throw_exception_uploading_file_that_does_not_exist ( )

Protected Methods

Method Description
createRequestObject ( seregazhuk\PinterestBot\Api\Contracts\HttpClient $http = null, string $userAgentString = '' ) : Request
getHttpObject ( ) : Mock | seregazhuk\PinterestBot\Api\Contracts\HttpClient
http_should_execute_and_return ( Mock $http, mixed $returnsValue, integer $times = 1 )
tearDown ( )

Method Details

createRequestObject() protected method

protected createRequestObject ( seregazhuk\PinterestBot\Api\Contracts\HttpClient $http = null, string $userAgentString = '' ) : Request
$http seregazhuk\PinterestBot\Api\Contracts\HttpClient
$userAgentString string
return seregazhuk\PinterestBot\Api\Request

getHttpObject() protected method

protected getHttpObject ( ) : Mock | seregazhuk\PinterestBot\Api\Contracts\HttpClient
return Mockery\Mock | seregazhuk\PinterestBot\Api\Contracts\HttpClient

http_should_execute_and_return() protected method

protected http_should_execute_and_return ( Mock $http, mixed $returnsValue, integer $times = 1 )
$http Mockery\Mock
$returnsValue mixed
$times integer

it_should_clear_token_and_login_status_after_logout() public method

it_should_create_pinterest_request_object_with_bookmarks() public method

it_should_create_pinterest_request_object_with_data() public method

it_should_create_post_data_for_upload() public method

it_should_create_simple_pinterest_request_object() public method

it_should_load_cookies_from_previously_saved_session_on_auto_login() public method

it_should_return_logged_in_status() public method

it_should_set_csrf_token_to_default_value_after_clear() public method

it_should_throw_exception_uploading_file_that_does_not_exist() public method

tearDown() protected method

protected tearDown ( )