Class BaseWebTest.
Base class for web functional tests.
Methods
Find and boot class traits.
_boot()
inherited
|
|
|
|
Throws |
- \ReflectionException
|
Find and un-boot traits.
_unBoot()
inherited
Check method exists in trait and call it.
checkTraits(string $prefix = '')
inherited
Arguments
$prefix
string
Method name prefix
Clear global arrays.
clear()
inherited
{@inheritdoc}
createApplication()
inherited
Calls a DELETE URI.
delete(string $uri, array $parameters = array(), array $files = array(), array $server = array(), string $content = null, boolean $changeHistory = true) : $this
inherited
Arguments
$uri
string
The URI to fetch
$parameters
array
The Request parameters
$server
array
The server parameters (HTTP headers are referenced with a HTTP_ prefix as PHP does)
$content
string
The raw body data
$changeHistory
boolean
Whether to update the history or not (only used internally for back(), forward(),
and reload())
Response
$this
Rollback migrations.
downMigrationTrait()
inherited static
Calls a GET URI.
get(string $uri, array $parameters = array(), array $files = array(), array $server = array(), string $content = null, boolean $changeHistory = true) : $this
inherited
Arguments
$uri
string
The URI to fetch
$parameters
array
The Request parameters
$server
array
The server parameters (HTTP headers are referenced with a HTTP_ prefix as PHP does)
$content
string
The raw body data
$changeHistory
boolean
Whether to update the history or not (only used internally for back(), forward(),
and reload())
Response
$this
getAllowRedirect
getAllowRedirect() : boolean|integer
inherited
Get test application instance.
getAppClass() : \sonrac\FCoverage\TestApplication
inherited abstract
Get database connection.
getConnection() : \Doctrine\DBAL\Connection
inherited
Response
\Doctrine\DBAL\Connection
Get count redirects.
getCountRedirects() : integer
inherited
Get response object.
getResponseObject() : \Symfony\Component\HttpFoundation\Response|null
inherited
Response
\Symfony\Component\HttpFoundation\Response|null
Increment count redirects.
incrementCountRedirects()
inherited
Init migration trait.
initInitMigrationAppTrait()
inherited static
Get is need clear count redirects.
isClearCountRedirects() : boolean
inherited
Check is thrown exception on redirect.
isThrowExceptionOnRedirect() : boolean
inherited
Calls a PATCH URI.
patch(string $uri, array $parameters = array(), array $files = array(), array $server = array(), string $content = null, boolean $changeHistory = true) : $this
inherited
Arguments
$uri
string
The URI to fetch
$parameters
array
The Request parameters
$server
array
The server parameters (HTTP headers are referenced with a HTTP_ prefix as PHP does)
$content
string
The raw body data
$changeHistory
boolean
Whether to update the history or not (only used internally for back(), forward(),
and reload())
Response
$this
Calls a POST URI.
post(string $uri, array $parameters = array(), array $files = array(), array $server = array(), string $content = null, boolean $changeHistory = true) : $this
inherited
Arguments
$uri
string
The URI to fetch
$parameters
array
The Request parameters
$server
array
The server parameters (HTTP headers are referenced with a HTTP_ prefix as PHP does)
$content
string
The raw body data
$changeHistory
boolean
Whether to update the history or not (only used internally for back(), forward(),
and reload())
Response
$this
Prepare migrations before run.
prepareMigrations()
inherited static
Calls a PUT URI.
put(string $uri, array $parameters = array(), array $files = array(), array $server = array(), string $content = null, boolean $changeHistory = true) : $this
inherited
Arguments
$uri
string
The URI to fetch
$parameters
array
The Request parameters
$server
array
The server parameters (HTTP headers are referenced with a HTTP_ prefix as PHP does)
$content
string
The raw body data
$changeHistory
boolean
Whether to update the history or not (only used internally for back(), forward(),
and reload())
Response
$this
Calls a URI.
request(string $method, string $uri, array $parameters = array(), array $files = array(), array $server = array(), string $content = null, boolean $changeHistory = true) : $this
inherited abstract
Arguments
$method
string
The request method
$uri
string
The URI to fetch
$parameters
array
The Request parameters
$server
array
The server parameters (HTTP headers are referenced with a HTTP_ prefix as PHP does)
$content
string
The raw body data
$changeHistory
boolean
Whether to update the history or not (only used internally for back(), forward(),
and reload())
Response
$this
See in table count records.
seeCountInTable(string $table, integer $count, array|null $params = null) : $this
inherited
See in database.
seeInDatabase(string $table, array|string $condition) : $this
inherited
Arguments
$condition
array|string
Where condition.
Response
$this
See json structure.
seeJsonStructure(array $struct, array $data = null) : $this
inherited
See status code in response.
seeStatusCode(integer $statusCode) : $this
inherited
Throws |
- \PHPUnit\Framework\AssertionFailedError
|
Arguments
Response
$this
setAllowRedirect
setAllowRedirect(boolean|integer $allowRedirect)
inherited
Arguments
$allowRedirect
boolean|integer
Set application.
setApplication(\Silex\Application $app)
Get is need clear count redirects.
setClearCountRedirects(boolean $clear) : $this
inherited
Set count redirects.
setCountRedirects(integer $_countRedirects)
inherited
Set thrown exception on redirect.
setThrowExceptionOnRedirect(boolean $throwExceptionOnRedirect)
inherited
Arguments
$throwExceptionOnRedirect
boolean
{@inheritdoc}
setUp()
|
|
|
|
Throws |
- \ReflectionException
|
{@inheritdoc}
setUpBeforeClass()
inherited static
{@inheritdoc}
tearDown()
|
|
|
|
Throws |
- \ReflectionException
|
{@inheritdoc}
tearDownAfterClass()
inherited static
Properties
Http client object.
client : null|\Symfony\Component\HttpKernel\Client
Type(s)
null|\Symfony\Component\HttpKernel\Client
Response object.
response : null|\Symfony\Component\HttpFoundation\Response
Type(s)
null|\Symfony\Component\HttpFoundation\Response
Crawler instance.
crawler : null|\Symfony\Component\DomCrawler\Crawler
Type(s)
null|\Symfony\Component\DomCrawler\Crawler
If false - disable redirects. If number - max enabled redirects count.
allowRedirect : boolean|integer
inherited
If true generate exception when count redirects more than `allowRedirect` value.
throwExceptionOnRedirect : boolean
inherited
Clear redirects count.
clearCountRedirects : boolean
inherited
Current count redirects.
countRedirects : integer
inherited
Run migration if true or does not run otherwise.
runMigration : boolean
inherited static
Seeds list.
seeds : array
inherited static