rsfResponseValidatorPlugin - 0.1.2

Response validation plugin.

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to the Plugins Home


Forgot your password?
Create an account



advanced search
Information Readme Dependencies Releases Changelog Contribute
Show source


This plugin is still very much alpha release software, the API might change in the future!



You can install the plugin with the symfony installer, by downloading the source or adding an svn:externals property to your SVN working copy.

  • Symfony:

    $ symfony plugin:install rsfResponseValidatorPlugin
  • Download:

    $ svn checkout
  • SVN:

    $ svn propset svn:externals " rsfResponseValidatorPlugin" plugins

After downloading the source code you should clear your symfony cache:

$ php symfony cache:clear --type="config"


The plugin works out of the box but it's best to add these configuration values to your app.yml file. This way you can easily change the configuration after installation.

    xhtml_validation_uri: ''
    xhtml_validation:     true
    css_validation_uri:   ''
    css_validation:       true
    web_browser_class:    'sfWebBrowser'


When you bootstrap your functional test browser add the customized response tester like this:

$browser = new sfTestFunctional(new sfBrowser(), array('response' => 'rsfTesterResponse'));

CSS validation is not yet supported

Now you can call the isValidXhtml(), isValidCss() and isValidResponse() methods within the response context:

// the isValidResponse method calls both isValidXhtml and isValidCss

Afterwords you should be able to test your code with response validation.

$ symfony test:functional <AppName> <ControllerName>