라임 (소프트웨어)
라임(lime)은 펄 라이브러리 기반의 심포니 웹 프레임워크를 위해 빌드된 유닛 테스트 및 기능 테스트 프레임워크이다.[2] 이 프레임워크는 컬러 포맷팅을 포함하여 테스트로부터 읽기 가능한 출력물을 가져오기 위해 설계되었으며, 또 테스트 애니띵 프로토콜을 따르기 때문에 다른 도구들과 쉬운 연동이 가능하다.[2] 라임 테스트들은 샌드박스 환경에서 구동되므로 테스트 실행 중에 서로에게 미치는 영향을 최소화한다.[2] 라임 테스팅 프레임워크가 심포니 안에서 테스트하기 위해 빌드되어 있지만 라임은 하나의 PHP 파일 내에 포함되므로 심포니나 기타 어떠한 라이브러리와도 의존성이 없다.[1][2] 알파 버전의 라임 2.0은 2009년 9월 10일에 발표되었으며[3] 심포니 1.2 이하와 호환된다.[4] 심포니 2.0은 테스트를 위해 라임 대신에 PHPUnit을 사용한다.[5] 예라임 유닛 테스트들은 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 = array('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.');
버전 2.0라임 알파 버전 2.0이 2009년 11월 10일 심포니 블로그에서 발표되었다.[6] 라임의 두 번째 버전은 가능하면 최초 버전과 하위 호환되도록 개발되었으며 라임 1.0과 호환되지 않는 라임 2.0의 두 부분은 테스트 하네스 구성과 같이 보기각주
외부 링크 |
Portal di Ensiklopedia Dunia