The Definitive Guide to symfony | Chapter 15 - Unit And Functional Testing | symfony | Web PHP Frame...

The Definitive Guide to symfony | Chapter 15 - Unit And Functional Testing | symfony | Web PHP Framework

The Lime Testing Framework

There are many unit test frameworks in the PHP world, with the most well known being PhpUnit and SimpleTest. Symfony has its own, called lime. It is based on the Test::More Perl library, and is TAP compliant, which means that the result of tests is displayed as specified in the Test Anything Protocol, designed for better readability of test output.

Lime provides support for unit testing. It is more lightweight than other PHP testing frameworks and has several advantages:

  • It launches test files in a sandbox to avoid strange side effects between each test run. Not all testing frameworks guarantee a clean environment for each test.
  • Lime tests are very readable, and so is the test output. On compatible systems, lime uses color output in a smart way to distinguish important information.
  • Symfony itself uses lime tests for regression testing, so many examples of unit and functional tests can be found in the symfony source code.
  • The lime core is validated by unit tests.
  • It is written in PHP, and it is fast and well coded. It is contained in a single file, lime.php, without any dependence.

The various tests described next use the lime syntax. They work out of the box with any symfony installation.

posted on 2012-05-07 07:11  lexus 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/lexus/archive/2012/05/07/2486820.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值