Lime (test framework)
lime is a unit testing and functional testing framework built specifically for the Symfony web application framework based on the Test::More Perl library. 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. lime tests are run in a sandbox environment to minimize test executions from influencing each other. 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. The alpha version of lime 2.0 was announced on November 10, 2009 and is compatible with Symfony 1.2 and lower. Symfony 2.0 uses PHPUnit for testing instead of lime.
lime is a unit testing and functional testing framework built specifically for the Symfony web application framework based on the Test::More Perl library. 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. lime tests are run in a sandbox environment to minimize test executions from influencing each other. 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. The alpha version of lime 2.0 was announced on November 10, 2009 and is compatible with Symfony 1.2 and lower. Symfony 2.0 uses PHPUnit for testing instead of lime. 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.');
References
No reference rows published for this article.
Cite this article
MLA
"Lime (test framework)." encyclopegia.org, 2026, https://encyclopegia.org/wiki/lime-test-framework. Accessed 24 November 2026.
Chicago
"Lime (test framework)." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/lime-test-framework.
APA
encyclopegia.org. (2026). Lime (test framework). Retrieved November 24, 2026, from https://encyclopegia.org/wiki/lime-test-framework
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON