Overview

Namespaces

  • GLFramework
    • Cache
    • Controller
    • DaMa
      • Manipulators
    • Database
    • HTTP
    • Mail
    • Middleware
    • Model
    • Module
    • Tests
    • Upload
    • Utils
  • None

Classes

  • DatabaseTestCase
  • TestCase
  • Overview
  • Namespace
  • Class

Class TestCase

Created by PhpStorm. User: manus Date: 16/03/16 Time: 9:59

PHPUnit_Framework_TestCase
Extended by GLFramework\Tests\TestCase
Namespace: GLFramework\Tests
Located at Tests/TestCase.php
Methods summary
public
# requireDatabase( )
protected
# tearDown( )
public
# removeLater( $model )
public GLFramework\DatabaseManager
# getDatabase( )

Returns

GLFramework\DatabaseManager
public
# visit( $url )
public
# makeRequestUsingForm( $form, array $uploads = array() )

Parameters

$form
Form
$uploads

Returns


$this|TestCase
public
# call( $method, $uri, $params = array(), $cookies = array(), $files = array() )
public
# followRedirects( )
public
# buildFilesForm( $files )
public
# getContent( )
public
# see( $text, $negate = false )
protected
# dontSee( $text )
protected
# seeInElement( $element, $text, $negate = false )
public
# seeLink( string $text, string|null $url = null )

Assert that a given link is seen on the page.

Assert that a given link is seen on the page.

Parameters

$text
$url

Returns


$this
public
# dontSeeLink( string $text, string|null $url = null )

Assert that a given link is not seen on the page.

Assert that a given link is not seen on the page.

Parameters

$text
$url

Returns


$this
public
# seeInField( string $selector, string $expected )

Assert that an input field contains the given value.

Assert that an input field contains the given value.

Parameters

$selector
$expected

Returns


$this
public
# dontSeeInField( string $selector, string $value )

Assert that an input field does not contain the given value.

Assert that an input field does not contain the given value.

Parameters

$selector
$value

Returns


$this
public
# seeIsChecked( string $selector )

Assert that the given checkbox is selected.

Assert that the given checkbox is selected.

Parameters

$selector

Returns


$this
public
# dontSeeIsChecked( string $selector )

Assert that the given checkbox is not selected.

Assert that the given checkbox is not selected.

Parameters

$selector

Returns


$this
public
# seeIsSelected( string $selector, string $expected )

Assert that the expected value is selected.

Assert that the expected value is selected.

Parameters

$selector
$expected

Returns


$this
public
# dontSeeIsSelected( string $selector, string $value )

Assert that the given value is not selected.

Assert that the given value is not selected.

Parameters

$selector
$value

Returns


$this
protected string
# getInputOrTextAreaValue( string $selector )

Get the value of an input or textarea.

Get the value of an input or textarea.

Parameters

$selector

Returns

string

Throws

Exception
protected string|null
# getSelectedValue( string $selector )

Get the selected value of a select field or radio group.

Get the selected value of a select field or radio group.

Parameters

$selector

Returns

string|null

Throws

Exception
protected string|null
# getSelectedValueFromSelect( Symfony\Component\DomCrawler\Crawler $field )

Get the selected value from a select field.

Get the selected value from a select field.

Parameters

$field

Returns

string|null

Throws

Exception
protected string|null
# getCheckedValueFromRadioGroup( Symfony\Component\DomCrawler\Crawler $radioGroup )

Get the checked value from a radio group.

Get the checked value from a radio group.

Parameters

$radioGroup

Returns

string|null

Throws

Exception
protected boolean
# isChecked( string $selector )

Return true if the given checkbox is checked, false otherwise.

Return true if the given checkbox is checked, false otherwise.

Parameters

$selector

Returns

boolean

Throws

Exception
protected
# click( string $name )

Click a link with the given body, name, or ID attribute.

Click a link with the given body, name, or ID attribute.

Parameters

$name

Returns


$this

Throws

InvalidArgumentException
protected
# type( string $text, string $element )

Fill an input field with the given text.

Fill an input field with the given text.

Parameters

$text
$element

Returns


$this
protected
# check( string $element )

Check a checkbox on the page.

Check a checkbox on the page.

Parameters

$element

Returns


$this
protected
# uncheck( string $element )

Uncheck a checkbox on the page.

Uncheck a checkbox on the page.

Parameters

$element

Returns


$this
protected
# select( string $option, string $element )

Select an option from a drop-down.

Select an option from a drop-down.

Parameters

$option
$element

Returns


$this
protected
# attach( string $absolutePath, string $element )

Attach a file to a form field on the page.

Attach a file to a form field on the page.

Parameters

$absolutePath
$element

Returns


$this
protected
# press( string $buttonText )

Submit a form using the button with the given text value.

Submit a form using the button with the given text value.

Parameters

$buttonText

Returns


$this
protected
# submitForm( string $buttonText, array $inputs = [], array $uploads = [] )

Submit a form on the page with the given input.

Submit a form on the page with the given input.

Parameters

$buttonText
$inputs
$uploads

Returns


$this
protected Symfony\Component\DomCrawler\Form
# fillForm( string $buttonText, array $inputs = [] )

Fill the form with the given data.

Fill the form with the given data.

Parameters

$buttonText
$inputs

Returns

Symfony\Component\DomCrawler\Form
protected Symfony\Component\DomCrawler\Form
# getForm( string|null $buttonText = null )

Get the form from the page with the given submit button text.

Get the form from the page with the given submit button text.

Parameters

$buttonText

Returns

Symfony\Component\DomCrawler\Form

Throws

InvalidArgumentException
protected
# storeInput( string $element, string $text )

Store a form input in the local array.

Store a form input in the local array.

Parameters

$element
$text

Returns


$this
protected
# assertFilterProducesResults( string $filter )

Assert that a filtered Crawler returns nodes.

Assert that a filtered Crawler returns nodes.

Parameters

$filter

Throws

InvalidArgumentException
protected Symfony\Component\DomCrawler\Crawler
# filterByNameOrId( string $name, array|string $elements = '*' )

Filter elements according to the given name or ID attribute.

Filter elements according to the given name or ID attribute.

Parameters

$name
$elements

Returns

Symfony\Component\DomCrawler\Crawler
Properties summary
protected Symfony\Component\DomCrawler\Crawler $crawler
#
protected GLFramework\Response $response
#
protected array $inputs
# array()
protected array $uploads
# array()
API documentation generated by ApiGen