phpspec

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

Github stars Tracking Chart

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

Overview

Name With Ownerphpspec/phpspec
Primary LanguagePHP
Program languagePHP (Language Count: 4)
PlatformLinux, Mac, Windows
License:Other
Release Count119
Last Release Name7.5.0 (Posted on )
First Release Namephpspec-0.2.2 (Posted on 2011-04-25 13:38:03)
Created At2011-04-07 12:48:08
Pushed At2024-03-04 14:38:14
Last Commit At
Stargazers Count1.9k
Watchers Count59
Fork Count276
Commits Count3.3k
Has Issues Enabled
Issues Count622
Issue Open Count129
Pull Requests Count643
Pull Requests Open Count3
Pull Requests Close Count201
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

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.

To the top