Kraken\_Unit\Network\Http\Component\Router\HttpRouterTest::testApiAllowOrigin_BlocksAddress PHP Метод

testApiAllowOrigin_BlocksAddress() публичный Метод

    public function testApiAllowOrigin_BlocksAddress()
    {
        $ip = '50.50.50.50';
        $server = $this->createServer();
        $router = $this->createRouter($server);
        $this->assertFalse(array_key_exists($ip, $this->getProtectedProperty($router, 'allowedOrigins')));
        $router->allowOrigin($ip);
        $this->assertTrue(array_key_exists($ip, $this->getProtectedProperty($router, 'allowedOrigins')));
    }
HttpRouterTest