PHP code example of lasotaartur / phpspec-silex
1. Go to this page and download the library: Download lasotaartur/phpspec-silex library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lasotaartur / phpspec-silex example snippets
$app = new Silex\Application();
$app->get('/hello/{name}', function ($name) use ($app) {
return 'Hello '.$app->escape($name);
});
return $app;
namespace spec;
use PhpSpec\Silex\SilexObjectBehavior;
class ProductSpec extends SilexObjectBehavior
{
function it_let()
{
$this->app #this is silex application
}
}