Viewing File: /home/xaimptsg/public_html/src/vendor/akaunting/laravel-firewall/tests/Feature/RfiTest.php
<?php
namespace Akaunting\Firewall\Tests\Feature;
use Akaunting\Firewall\Middleware\Rfi;
use Akaunting\Firewall\Tests\TestCase;
class RfiTest extends TestCase
{
public function testShouldAllow()
{
$this->assertEquals('next', (new Rfi())->handle($this->app->request, $this->getNextClosure()));
}
public function testShouldBlock()
{
$this->app->request->query->set('foo', 'https://attacker.example.com/evil.php');
$this->assertEquals('403', (new Rfi())->handle($this->app->request, $this->getNextClosure())->getStatusCode());
}
}
Back to Directory