<commit_before><?php
namespace RKA\Middleware\Test;

use RKA\Middleware\ProxyDetection;
use Zend\Diactoros\ServerRequestFactory;
use Zend\Diactoros\Response;

class ProxyDetectionTest extends \PHPUnit_Framework_TestCase
{
    public function testSchemeAndHostAndPortWithPortInHostHeader()
    {
        $request = ServerRequestFactory::fromGlobals([
            'REMOTE_ADDR' => '192.168.0.1',
            'HTTP_HOST' => 'foo.com',
            'HTTP_X_FORWARDED_PROTO' => 'https',
            'HTTP_X_FORWARDED_HOST' => 'example.com:1234',
        ]);

        $response = new Response();

        $middleware = new ProxyDetection();<commit_msg>Update test for PHPUnit 6<commit_after><?php
namespace RKA\Middleware\Test;

use PHPUnit\Framework\TestCase;
use RKA\Middleware\ProxyDetection;
use Zend\Diactoros\Response;
use Zend\Diactoros\ServerRequestFactory;

class ProxyDetectionTest extends TestCase
{
    public function testSchemeAndHostAndPortWithPortInHostHeader()
    {
        $request = ServerRequestFactory::fromGlobals([
            'REMOTE_ADDR' => '192.168.0.1',
            'HTTP_HOST' => 'foo.com',
            'HTTP_X_FORWARDED_PROTO' => 'https',
            'HTTP_X_FORWARDED_HOST' => 'example.com:1234',
        ]);

        $response = new Response();

        $middleware = new ProxyDetection();
{'fraction_non_alphanumeric': 0.1155893536121673, 'fraction_numerical': 0.019011406844106463, 'mean_word_length': 3.357615894039735, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7632469', 'n_tokens_mistral': 435, 'n_tokens_neox': 405, 'n_words': 69}