App\Test\TestCase\Controller\PagesControllerTest::testDirectoryTraversalProtection PHP Method

testDirectoryTraversalProtection() public method

Test directory traversal protection
    public function testDirectoryTraversalProtection()
    {
        $this->get('/pages/../Layout/ajax');
        $this->assertResponseCode(403);
        $this->assertResponseContains('Forbidden');
    }