|
|
Setting up unit and functional tests in okapiexternals (requires okapi 1.1.7+)ext/testing https://svn.liip.ch/repos/public/okapi/ext/testing/trunk/ inc/lib/simpletest https://simpletest.svn.sourceforge.net/svnroot/simpletest/simpletest/trunk/ rakein the project root directory create a textfile "Rakefile" with the following content import 'ext/testing/rake/Rakefile' in the project root create the directory "tests" and inside that directory create a "unit" and "functional" directory in project root call the rake shell command machine:projectfolder user$ rake (in projectfolder) cd ext/testing && php test.php unit Unit OK Test cases run: 0/0, Passes: 0, Failures: 0, Exceptions: 0 cd ext/testing && php test.php functional Functional OK Test cases run: 0/0, Passes: 0, Failures: 0, Exceptions: 0 create a unit test (tests/unit/myfirsttest.php) <?php
class test_myfirsttest extends api_testing_case_unit
{
function test_assertTrue(){
$this->assertTrue(true);
}
}
create a functional tests (tests/functional/myFirstFunctionalTest.php) <?php
class test_myFirstFuntionalTest extends api_testing_case_functional
{
function test_assertTrue(){
$this->get("/");
$this->openInBrowser();
}
}
Additional information
|
Skip to end of metadata
Go to start of metadata