<commit_before><?php

/**
 * Test to verify the use of the Negotiate::charsetBest method.
 *
 * PHP Version 5.3
 *
 * @copyright   (c) 2006-2014 <NAME>
 * @author      <NAME> <<EMAIL>>
 * @license     http://opensource.org/licenses/MIT MIT
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace ptlis\ConNeg\Test\Negotiate;


use ptlis\ConNeg\Collection\TypePairCollection;
use ptlis\ConNeg\Negotiate;
use ptlis\ConNeg\QualityFactor\QualityFactor;
use ptlis\ConNeg\Type\AbsentType;
use ptlis\ConNeg\Type\Charset\CharsetType;
use ptlis\ConNeg\Type\WildcardType;
use ptlis\ConNeg\TypePair\TypePair;

class CharsetBestTest extends \PHPUnit_Framework_TestCase
{
    public function testUserAndAppEmpty()
    {
        $httpField  = '';
        $appPrefs   = '';

        $expectPair = new TypePair(
            new AbsentType(),
            new AbsentType()
        );

        $negotiate = new Negotiate();
        $resultType = $negotiate->charsetBest($httpField, $appPrefs);

        $this->assertEquals($expectPair, $resultType);
    }

<commit_msg>Remove unused 'use' statements from CharsetBestType.<commit_after><?php

/**
 * Test to verify the use of the Negotiate::charsetBest method.
 *
 * PHP Version 5.3
 *
 * @copyright   (c) 2006-2014 <NAME>
 * @author      <NAME> <<EMAIL>>
 * @license     http://opensource.org/licenses/MIT MIT
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace ptlis\ConNeg\Test\Negotiate;

use ptlis\ConNeg\Negotiate;
use ptlis\ConNeg\QualityFactor\QualityFactor;
use ptlis\ConNeg\Type\AbsentType;
use ptlis\ConNeg\Type\Charset\CharsetType;
use ptlis\ConNeg\TypePair\TypePair;

class CharsetBestTest extends \PHPUnit_Framework_TestCase
{
    public function testUserAndAppEmpty()
    {
        $httpField  = '';
        $appPrefs   = '';

        $expectPair = new TypePair(
            new AbsentType(),
            new AbsentType()
        );

        $negotiate = new Negotiate();
        $resultType = $negotiate->charsetBest($httpField, $appPrefs);

        $this->assertEquals($expectPair, $resultType);
    }


{'fraction_non_alphanumeric': 0.11335125448028674, 'fraction_numerical': 0.008960573476702509, 'mean_word_length': 3.1816479400749063, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '3501044', 'n_tokens_mistral': 735, 'n_tokens_neox': 702, 'n_words': 165}