Kraken\_Unit\Network\Socket\Component\Firewall\FirewallTest::testApiHandleError_PropagatesError_WhenIPIsValid PHP Метод

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

    public function testApiHandleError_PropagatesError_WhenIPIsValid()
    {
        $host = 'host';
        $ex = new Exception();
        $conn = $this->getMock(NetworkConnection::class, [], [], '', false);
        $conn->expects($this->once())->method('getHost')->will($this->returnValue($host));
        $server = $this->createServer();
        $component = $this->createComponent();
        $component->expects($this->once())->method('handleError')->with($conn, $ex);
        $firewall = $this->createFirewall($server, $component, ['isAddressBlocked']);
        $firewall->expects($this->once())->method('isAddressBlocked')->with($host)->will($this->returnValue(false));
        $firewall->handleError($conn, $ex);
    }