承接 lasotaartur/phpspec-silex 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lasotaartur/phpspec-silex

Composer 安装命令:

composer require --dev lasotaartur/phpspec-silex

包简介

Test your Silex applications with PhpSpec

README 文档

README

phpspec Extension for testing Silex applications.

Installation

Add this to your composer.json:

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

then add this to your phpspec.yml:

extensions:
    - PhpSpec\Silex\Extension\SilexExtension

Why this extension?

This extension provides you with a bootstrapped Silex environment when writing your phpspec tests.

Configuration

in your phpspec.yml.

App bootstrap path

By default, the extension will bootstrap your app by looking for app/bootstrap.php.

You can manually specify the path to the bootstrap file, like so:

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

Example of bootstrap.php

<?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.

Example

<?php
namespace spec;

use PhpSpec\Silex\SilexObjectBehavior;

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

统计信息

  • 总下载量: 9.23k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-01-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固