Download the PHP package codeception/symfony1module without Composer
On this page you can find all versions of the php package codeception/symfony1module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codeception/symfony1module
More information about codeception/symfony1module
Files in codeception/symfony1module
Package symfony1module
Short Description Module for symfony 1.x framework
License MIT
Informations about the package symfony1module
Symfony1 Module
Codeception Module that interacts with Symfony 1.4 applications.
Replaces functional testing framework from symfony. Authorization features uses Doctrine and sfDoctrineGuardPlugin. Uses native symfony connections and test classes. Provides additional informations on every actions.
If test fails stores last shown page in 'log' dir.
Installation
In composer.json
Status
- Maintainer: davert
- Stability: stable
- Contact: [email protected]
Configuration
- app required - application you want to test. In most cases it will be 'frontend'
Public Properties
- browser - current instance of sfBrowser class.
amLoggedAs
Log in as sfDoctrineGuardUser. Only name of user should be provided. Fetches user by it's username from sfGuardUser table.
param
$name \Exception
amOnPage
Opens the page.
param
$page
click
Click on link or button and move to next page. Either link text, css selector, or xpath can be passed
param
$link
clickSubmitButton
Emulates click on form's submit button. You don't need that action if you fill form by ->submitForm action.
param
$selector
dontSee
Check if current page doesn't contain the text specified. Specify the css selector to match only specific region.
Examples:
param
$textparam null
$selector
dontSeeCheckboxIsChecked
Assert if the specified checkbox is unchecked. Use css selector or xpath to match.
Example:
param
$selector
dontSeeLink
Checks if page doesn't contain the link with text specified. Specify url to narrow the results.
Examples:
param
$textparam null
$url
see
Check if current page contains the text specified. Specify the css selector to match only specific region.
Examples:
param
$textparam null
$selector
seeCheckboxIsChecked
Assert if the specified checkbox is checked. Use css selector or xpath to match.
Example:
param
$selector
seeEmailReceived
Checks if there were at least one email sent through Symfony test mailer.
seeErrorInField
Checks for invalid value in Symfony1 form. Matches the first sfForm instance from controller and returns getErrorSchema() values. Specify field which should contain error message.
param
$field
seeErrorsInForm
Performs validation of Symfony1 form. Matches the first sfForm instance from controller and returns getErrorSchema() values. Shows all errors in debug.
seeFormIsValid
Performs validation of Symfony1 form. Matches the first sfForm instance from controller and returns isValid() value.
seeLink
Checks if there is a link with text specified. Specify url to match link with exact this url.
Examples:
param
$textparam null
$url
sendAjaxGetRequest
If your page triggers an ajax request, you can perform it manually. This action sends a GET ajax request with specified params.
See ->sendAjaxPostRequest for examples.
param
$uriparam
$params
sendAjaxPostRequest
If your page triggers an ajax request, you can perform it manually. This action sends a POST ajax request with specified params. Additional params can be passed as array.
Example:
Imagine that by clicking checkbox you trigger ajax request which updates user settings. We emulate that click by running this ajax request manually.
param
$uriparam
$params
signIn
Sign's user in with sfGuardAuth. Uses standard path: /sfGuardAuth/signin for authorization. Provide username and password.
param
$usernameparam
$password
signOut
Sign out is performing by triggering '/logout' url.
submitForm
Submits a form located on page. Specify the form by it's css or xpath selector. Fill the form fields values as array.
Skipped fields will be filled by their values from page. You don't need to click the 'Submit' button afterwards. This command itself triggers the request to form's action.
Examples:
For sample Sign Up form:
I can write this:
Note, that pricing plan will be set to Paid, as it's selected on page.
param
$selectorparam
$params