sh
li3 test lithium/tests/cases/core/ObjectTest.php
li3 test lithium/tests/cases/core
If you are in the working directory of an application or plugin and wish to run all tests,
simply execute the following:
sh
li3 test tests/cases
If you are in the working directory of an application and wish to run a plugin, execute one
of the following:
sh
li3 test libraries//tests/cases
li3 test /tests/cases
This will run /tests/cases//Test.php :
sh
li3 test //.php
public function testJsonFormat() { $command = new Test(array('request' => $this->request, 'classes' => $this->classes)); $path = LITHIUM_LIBRARY_PATH . '/lithium/tests/mocks/test/cases/MockTest.php'; $command->format = 'json'; $command->run($path); $result = $command->response->output; $result = json_decode($result, true); $this->assertTrue(isset($result['count'])); $this->assertTrue(isset($result['stats'])); }
public function testJsonFormat() { $command = new Test(array('request' => $this->request, 'classes' => $this->classes)); $lithium = Libraries::get('lithium', 'path'); $path = $lithium . '/tests/mocks/test/cases/MockTest.php'; $command->format = 'json'; $command->run($path); $result = $command->response->output; $result = json_decode($result, true); $this->assertArrayHasKey('count', $result); $this->assertArrayHasKey('stats', $result); }