2017 © Pedro Peláez
 

library phpspec-silex

Test your Silex applications with PhpSpec

image

lasotaartur/phpspec-silex

Test your Silex applications with PhpSpec

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 9 Versions
  • 2 % Grown

The README.md

phpspec Silex Extension

phpspec Extension for testing Silex applications., (*1)

Installation

Add this to your composer.json:, (*2)

{
    "require": {
        "lasotaartur/phpspec-silex": "dev-master"
    }
}

then add this to your phpspec.yml:, (*3)

extensions:
    - PhpSpec\Silex\Extension\SilexExtension

Why this extension?

This extension provides you with a bootstrapped Silex environment when writing your phpspec tests., (*4)

Configuration

in your phpspec.yml., (*5)

App bootstrap path

By default, the extension will bootstrap your app by looking for app/bootstrap.php., (*6)

You can manually specify the path to the bootstrap file, like so:, (*7)

laravel_extension:
    bootstrap_path: "/your/path/bootstrap.php"

Example of bootstrap.php, (*8)

<?php

$app = new Silex\Application();

$app->get('/hello/{name}', function ($name) use ($app) {
    return 'Hello '.$app->escape($name);
});

return $app;

Usage

If you want use silex $app extend your specs from PhpSpec\Silex\SilexObjectBehavior., (*9)

Example, (*10)

<?php
namespace spec;

use PhpSpec\Silex\SilexObjectBehavior;

class ProductSpec extends SilexObjectBehavior
{
    function it_let()
    {
        $this->app #this is silex application
    }
}

The Versions

05/12 2017

dev-master

9999999-dev https://github.com/lasotaartur/phpspec-silex

Test your Silex applications with PhpSpec

  Sources   Download

MIT

The Requires

 

test testing silex phpspec

05/12 2017

2.0.0

2.0.0.0 https://github.com/lasotaartur/phpspec-silex

Test your Silex applications with PhpSpec

  Sources   Download

MIT

The Requires

 

test testing silex phpspec

05/12 2017

2.0.0.x-dev

2.0.0.9999999-dev https://github.com/lasotaartur/phpspec-silex

Test your Silex applications with PhpSpec

  Sources   Download

MIT

The Requires

 

test testing silex phpspec

19/12 2016

1.0.5

1.0.5.0 https://github.com/lasotaartur/phpspec-silex

Test your Silex applications with PhpSpec

  Sources   Download

MIT

The Requires

 

test testing silex phpspec

16/12 2016

1.0.4

1.0.4.0 https://github.com/lasotaartur/phpspec-silex

Test your Silex applications with PhpSpec

  Sources   Download

MIT

The Requires

 

test testing silex phpspec

16/12 2016

1.0.3

1.0.3.0 https://github.com/lasotaartur/phpspec-silex

Test your Silex applications with PhpSpec

  Sources   Download

MIT

The Requires

 

test testing silex phpspec

16/12 2016

1.0.2

1.0.2.0 https://github.com/lasotaartur/phpspec-silex

Test your Silex applications with PhpSpec

  Sources   Download

MIT

The Requires

 

test testing silex phpspec

16/12 2016

1.0.1

1.0.1.0 https://github.com/lasotaartur/phpspec-silex

Test your Silex applications with PhpSpec

  Sources   Download

MIT

The Requires

 

test testing silex phpspec

12/10 2016

1.0

1.0.0.0 https://github.com/lasotaartur/phpspec-silex

Test your Silex applications with PhpSpec

  Sources   Download

MIT

The Requires

 

test testing silex phpspec