lime
Original authorFabien Potencier
DeveloperBernhard Schussek
Initial releaseJanuary 29, 2007; 19 years ago (2007-01-29)
Final release
1.0.9[1] / May 19, 2010; 16 years ago (2010-05-19)
Preview release
2.0.0alpha1 / November 9, 2009; 16 years ago (2009-11-09)
Written inPHP
Operating systemCross-platform
TypeTest tool
LicenseMIT License
Websitewww.symfony-project.org
Repository

lime is a unit testing and functional testing framework built specifically for the Symfony web application framework based on the Test::More Perl library.[2] The framework is designed to have readable output from tests, including color formatting, by following the Test Anything Protocol which also allows for easy integration with other tools.[2] lime tests are run in a sandbox environment to minimize test executions from influencing each other.[2] Though the lime testing framework is built for testing within Symfony, lime is contained within a single PHP file and has no dependency on Symfony or any other library.[1][2]

The alpha version of lime 2.0 was announced on November 10, 2009[3] and is compatible with Symfony 1.2 and lower.[4] Symfony 2.0 uses PHPUnit for testing instead of lime.[5]

Example

edit

lime unit tests use the lime_test object to make assertions. The following is a basic example lime unit test to test PHP's built-in in_array function.

include dirname(__FILE__) . '/bootstrap/unit.php'; // Include lime.

// Create the lime_test object for 10 number of assertions and color output.
$t = new lime_test(10, new lime_output_color());

// The test array.
$arr = ['Hello', 'World', 123];

// Output a comment.
$t->diag('in_array()');

// Test to make sure in_array returns a boolean value for both values
// that are in the array and not in the array.
$t->isa_ok(in_array('hey', $arr), 'bool', '\'in_array\' did not return a boolean value.');
$t->isa_ok(in_array('Hello', $arr), 'bool', '\'in_array\' did not return a boolean value.');
$t->isa_ok(in_array(5, $arr), 'bool', '\'in_array\' did not return a boolean value.');
$t->isa_ok(in_array(FALSE, $arr), 'bool', '\'in_array\' did not return a boolean value.');

// Test to make sure in_array can find values that are in the array
// and doesn't find values that are not in the array.
$t->ok(!in_array('hey', $arr), '\'in_array\' found a value not in the array.');
$t->ok(!in_array(5, $arr), '\'in_array\' found a value not in the array.');
$t->ok(!in_array(FALSE, $arr), '\'in_array\' found a value not in the array.');
$t->ok(in_array('Hello', $arr), '\'in_array\' failed to find a value that was in the array.');
$t->ok(in_array('World', $arr), '\'in_array\' failed to find a value that was in the array.');
$t->ok(in_array(123, $arr), '\'in_array\' failed to find a value that was in the array.');

Version 2.0

edit

The alpha version of lime 2.0 was announced on the Symfony blog on November 10, 2009.[6] The second version of lime was built to be as backward compatible with the first version as was possible - the two parts of lime 2.0 that are not compatible with lime 1.0 are the configuration of the test harness and the LimeCoverage class.[3] lime 2.0 includes support for xUnit output, source code annotations, parallel execution of tests, automatic generation of mock and stub objects, and operator overloading for data within tests.[3] Unlike the first version of lime, lime 2.0 does have some dependencies on Symfony.[5]

See also

edit

References

edit
  1. ^ a b "/tools/lime/tags/RELEASE_1_0_9 (log)". symfony - Trac. Archived from the original on 2016-07-30.
  2. ^ a b c d Potencier, Fabien; Zaninotto, François. The Definitive Guide to symfony, Apress, January 26, 2007, pp. 317-344. ISBN 1-59059-786-9
  3. ^ a b c "Lime 2 alpha released (Symfony Blog)".
  4. ^ "Using Symfony's Lime in phpUnderControl". Archived from the original on 2018-02-05.
  5. ^ a b "Can someone post a full working example of Lime 2 annotations?". Archived from the original on 2013-04-06.
  6. ^ SensioLabs. "(Press Release) Lime 2 alpha released". Retrieved 2017-11-23.
edit

📚 Artikel Terkait di Wikipedia

Lime

Look up lime, limé, līme, or łime in Wiktionary, the free dictionary. Lime most commonly refers to: Lime (fruit), a green citrus fruit Lime (material)

List of unit testing frameworks

a list of notable test automation frameworks commonly used for unit testing. Such frameworks are not limited to unit-level testing; they can be used for

Test (biology)

are thermodynamically unstable. The test of sea urchins is made of calcium carbonate, strengthened by a framework of calcite monocrystals, in a characteristic

Symfony

software portal Comparison of server-side web frameworks Lime, a Test framework for Symfony 1 Zend Framework Potencier, Fabien (2025-11-27). "Symfony 8.0

Limestone

type of carbonate sedimentary rock which is the main source of the material lime. It is composed mostly of the minerals calcite and aragonite, which are different

List of PHP software and tools

development testing framework for PHP Lime – unit testing and functional testing framework built specifically for the Symfony PHPUnit — unit testing framework Composer

Zeolite

for slower drying, which improves break strength. When added to lime mortars and lime-metakaolin mortars, synthetic zeolite pellets can act simultaneously

DevOps

rapid feedback. From an academic perspective, Len Bass, Ingo Weber, and Liming Zhu—three computer science researchers from the CSIRO and the Software Engineering