This is a test-bundle for the experimental form support., (*1)
It is very early status and will be finalized as a demo example over the weekend., (*2)
Distribution: Best used with Symfony Standard Edition, (*3)
Symfony(https://github.com/symfony/symfony) obviously., (*4)
``` php [AcmePizzaBundle] git=https://github.com/beberlei/AcmePizzaBundle.git target=/bundles/Acme/PizzaBundle, (*5)
[doctrine-fixtures] git=http://github.com/doctrine/data-fixtures.git, (*6)
[DoctrineFixturesBundle] git=http://github.com/symfony/DoctrineFixturesBundle.git target=/bundles/Symfony/Bundle/DoctrineFixturesBundle, (*7)
Next, run the vendors script to download the bundles: ``` bash $ php bin/vendors install
``` php $loader->registerNamespaces(array( 'Acme' => DIR.'/../vendor/bundles', // ..., (*8)
### Register AcmePizzaBundle to Kernel ``` php <?php # app/AppKernel.php //... $bundles = array( //... new Acme\PizzaBundle\AcmePizzaBundle(), ); //...
``` bash $ php app/console doctrine:database:create $ php app/console doctrine:schema:create, (*9)
### Enable routing configuration ``` yaml # app/config/routing.yml AcmePizzaBundle: resource: "@AcmePizzaBundle/Controller/" type: annotation prefix: /acme-pizza
``` bash $ php app/console assets:install web/, (*10)
### Data fixtures (optional) First, make sure that your db parameters are correctly set in `app/config/parameters.ini`. You'll need to install ``Doctrine Data Fixtures`` (don't forget to add the path to `AppKernel.php`) and then run: ``` bash $ php app/console doctrine:fixtures:load
You can read about install instructions in the Symfony2 Cookbook(http://symfony.com/doc/2.0/cookbook/doctrine/doctrine_fixtures.html#setup-and-configuration), (*11)
Go to app_dev.php/acme-pizza/pizza/list
and start selling pizzas., (*12)
You can launch functional tests with Selenium RC server running with the following steps:, (*13)
app/phpunit.xml.dist
:
``` xml, (*14)
Now you can run test (assuming that Selenium RC is running java -jar selenium-server-standalone-2.2.0.jar
)
with phpunit -c app/ src/Acme/PizzaBundle/Tests/
If you want you can submit other missing tests., (*17)