lithium\tests\cases\console\command\TestTest::testRunSingleTestWithRelativePath PHP Method

testRunSingleTestWithRelativePath() public method

    public function testRunSingleTestWithRelativePath()
    {
        $command = new Test(array('request' => $this->request, 'classes' => $this->classes));
        $path = 'tests/mocks/test/cases/MockTest.php';
        $command->run($path);
        $expected = "1 pass\n0 fails and 0 exceptions\n";
        $expected = preg_quote($expected);
        $result = $command->response->output;
        $this->assertPattern("/{$expected}/", $result);
        $command = new Test(array('request' => $this->request, 'classes' => $this->classes));
        $current = basename(getcwd());
        $path = "../{$current}/tests/mocks/test/cases/MockTest.php";
        $command->run($path);
        $expected = "1 pass\n0 fails and 0 exceptions\n";
        $expected = preg_quote($expected);
        $result = $command->response->output;
        $this->assertPattern("/{$expected}/", $result);
        $current = basename(getcwd());
        $path = "{$current}/tests/mocks/test/cases/MockTest.php";
        $command->run($path);
        $expected = "1 pass\n0 fails and 0 exceptions\n";
        $expected = preg_quote($expected);
        $result = $command->response->output;
        $this->assertPattern("/{$expected}/", $result);
    }