2017 © Pedro Peláez
 

symfony-bundle acme-pizza

image

beberlei/acme-pizza

  • Friday, January 27, 2012
  • by beberlei
  • Repository
  • 4 Watchers
  • 136 Stars
  • 334 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 30 Forks
  • 4 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Acme Pizza Bundle

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)

Requirements

Symfony(https://github.com/symfony/symfony) obviously., (*4)

Installation

Add the deps for the needed bundles

``` 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

Add to autoload.php

``` php $loader->registerNamespaces(array( 'Acme' => DIR.'/../vendor/bundles', // ..., (*8)


### Register AcmePizzaBundle to Kernel ``` php <?php # app/AppKernel.php //... $bundles = array( //... new Acme\PizzaBundle\AcmePizzaBundle(), ); //...

Create database and schema

``` 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

Refresh asset folder

``` 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)

Usage

Go to app_dev.php/acme-pizza/pizza/list and start selling pizzas., (*12)

Testing

You can launch functional tests with Selenium RC server running with the following steps:, (*13)

  • download selenium server
  • edit app/phpunit.xml.dist:
    • add php's server variable to match your configuration
    • add the selenium's browser configuration. I added Google Chrome Portable because it's faster than ie or even firefox.

app/phpunit.xml.dist

``` xml, (*14)

app/phpunit.xml.dist

, (*15)

```, (*16)

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)

The Versions

27/01 2012

dev-master

9999999-dev

  Sources   Download

The Requires

 

23/01 2012

v1.0.3

1.0.3.0

  Sources   Download

The Requires

 

23/01 2012

v1.0.2

1.0.2.0

  Sources   Download

The Requires

 

23/01 2012

v1.0.1

1.0.1.0

  Sources   Download

The Requires