sfPHPFitPlugin - 0.0.3

acceptance test(FIT) plugin

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
Show source

sfPHPFitPlugin

Installation

Install the plugin

php symfony plugin-install http://plugins.symfony-project.com/sfPHPFitPlugin

Enable the module in your settings.yml

dev:
  .settings:
    enabled_modules:        [phpFit]

Clear your cache

php symfony cc

Add the settings app.yml

dev:
  fit:
    view_class: sfPHPFit
    fixture_dir: %SF_TEST_DIR%/acceptance/fixture
 
    index:
      class: PHPFitAggregateReader
      param:
        dir_reader:
          class: PHPFitDirectoryReader
          param:
            input_dir: %SF_TEST_DIR%/acceptance/input
            types: [html, wiki]
        db_reader:
          class: myPHPFitDatabaseReader
          param:
            database_name: mydb
 
    process:
      html:
        class: PHPFitHTMLProcess
        param:
          input_dir: %SF_TEST_DIR%/acceptance/input
      wiki:
        class: PHPFitWikiProcess
        param:
          input_dir: %SF_TEST_DIR%/acceptance/input
          class: PHPFitWiki_Textile
      db:
        class: myPHPFitDatabaseProcess
        param:
          class: PHPFitWiki_Textile
          database_name: mydb

Usage

create HTML test case

{project_path}/test/acceptance/input
examples
sfPHPFitPlugin/test_example/acceptance/input

access testcase index

http://{your symfony app path}/fit

or

http://{your symfony app path}/fit/index

run testcase

http://{your symfony app path}/fit/process?in=example.html&type=html

create fixture

{project_path}/test/acceptance/fixture
examples
sfPHPFitPlugin/test_example/acceptance/fixture

Includes vendors

PHPFit
http://developer.berlios.de/projects/phpfit/
HatenaSyntax
http://coderepos.org/share/wiki/HatenaSyntax