phpspec

一个php工具集,通过规范来推动紧急设计。(A php toolset to drive emergent design by specification.)

Github星跟踪图

phpspec是一个工具,可以帮助您使用行为驱动开发或BDD编写干净和工作的PHP代码。BDD是一种来自测试开发的技术。

BDD是一种在故事层面和规格层面上使用的技术。 phpspec是在规格级别或SpecBDD使用的工具。 该技术是首先使用像phpspec这样的工具来描述您要写入的对象的行为。 接下来你编写足够的代码来满足这个规范,最后你重构这个代码。

SpecBDD和TDD

SpecBDD和TDD之间没有真正的区别。 使用xSpec工具而不是用于TDD的常规xUnit工具的价值是语言。 TDD的早期采用者侧重于代码的行为和设计。 随着时间的推移,重点已转向验证和结构。 BDD旨在通过消除测试语言来转移重点。 这个工具的概念和特征将会使您关注“正确”的事情。

SpecBDD和StoryBDD

StoryBDD工具像Behat有助于理解和澄清域。 他们帮助指定特征叙述,他们的需要,以及我们的意思。 使用SpecBDD,我们只关注如何,换句话说,实现。 您正在规定您的课程将如何实现这些功能。

只有使用故事级别的BDD才能做得足够帮助您很好地编写代码。 每个功能可能需要相当多的代码。 如果您只确认整个功能的工作原理,并且仅在那一点重构,那么您正在大步工作。 SpecBDD工具通过让您以小步骤编写代码来指导您的过程。 您只需要编写规范,然后编写要处理的下一小部分的代码,而不是整个功能。
StoryBDD和SpecBDD一起使用是实现以客户为中心的软件的有效途径。

(原文地址:http://www.phpspec.net/en/stable/manual/introducti...

主要指标

概览
名称与所有者phpspec/phpspec
主编程语言PHP
编程语言PHP (语言数: 4)
平台Linux, Mac, Windows
许可证Other
所有者活动
创建于2011-04-07 12:48:08
推送于2025-05-17 16:33:23
最后一次提交
发布数120
最新版本名称7.6.0 (发布于 )
第一版名称phpspec-0.2.2 (发布于 2011-04-25 13:38:03)
用户参与
星数1.9k
关注者数59
派生数284
提交数3.3k
已启用问题?
问题数626
打开的问题数131
拉请求数654
打开的拉请求数6
关闭的拉请求数207
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?

phpspec

The main website with documentation is at http://www.phpspec.net <http://www.phpspec.net>_.

.. image:: https://travis-ci.org/phpspec/phpspec.svg?branch=master
:target: https://travis-ci.org/phpspec/phpspec
:alt: Master Travis Build Status

.. image:: https://img.shields.io/scrutinizer/g/phpspec/phpspec.svg
:target: https://scrutinizer-ci.com/g/phpspec/phpspec/build-status/master
:alt: Master Scrutinizer Quality Score

.. image:: https://img.shields.io/appveyor/ci/ciaranmcnulty/phpspec/master.svg
:target: https://ci.appveyor.com/project/ciaranmcnulty/phpspec/branch/master
:alt: AppVeyor build status

.. image:: https://poser.pugx.org/phpspec/phpspec/downloads.png
:target: https://poser.pugx.org/phpspec/phpspec/downloads
:alt: Total downloads

.. image:: https://poser.pugx.org/phpspec/phpspec/v/stable.png
:target: https://poser.pugx.org/phpspec/phpspec/v/stable
:alt: Latest stable version

.. image:: https://poser.pugx.org/phpspec/phpspec/v/unstable.png
:target: https://poser.pugx.org/phpspec/phpspec/v/unstable
:alt: Latest unstable version

.. image:: https://poser.pugx.org/phpspec/phpspec/license.png
:target: https://poser.pugx.org/phpspec/phpspec/license
:alt: Software license

Installing Dependencies

Dependencies are handled via composer <https://getcomposer.org>_::

wget -nc https://getcomposer.org/composer.phar
php composer.phar install

Developer's mailing list

For development discussion subscribe to phpspec-dev@googlegroups.com <mailto:phpspec-dev@googlegroups.com>_.

Community

Check out #phpspec on irc.freenode.net.