<commit_before><?php

namespace Alchemy\Queue\Tests\Amqp;

use Alchemy\Queue\Amqp\AmqpConfiguration;

class AmqpConfigurationTest extends \PHPUnit_Framework_TestCase
{

    public function testHasDefaultValues()
    {
        $configuration = new AmqpConfiguration();

        $this->assertEquals('localhost', $configuration->getHost());
        $this->assertEquals('/', $configuration->getVhost());
        $this->assertEquals(5672, $configuration->getPort());
        $this->assertEquals('guest', $configuration->getUser());
        $this->assertEquals('guest', $configuration->getPassword());
        $this->assertEquals('alchemy-exchange', $configuration->getExchange());
        $this->assertEquals('alchemy-dead-exchange', $configuration->getDeadLetterExchange());
        $this->assertEquals('alchemy-queue', $configuration->getQueue());

        $configuration = AmqpConfiguration::parse([]);

        $this->assertEquals('localhost', $configuration->getHost());
        $this->assertEquals('/', $configuration->getVhost());
        $this->assertEquals(5672, $configuration->getPort());
        $this->assertEquals('guest', $configuration->getUser());
        $this->assertEquals('guest', $configuration->getPassword());
        $this->assertEquals('alchemy-exchange', $configuration->getExchange());
        $this->assertEquals('alchemy-dead-exchange', $configuration->getDeadLetterExchange());
        $this->assertEquals('alchemy-queue', $configuration->getQueue());
    }

    public function testParseCorrectlyAssignsValues()
    {
        $parameters = [
            'host' => '127.0.0.1',
            'vhost' => '/mock-vhost/',
            'port' => 5555,
            'user' => 'mock-user',
            'password' => '<PASSWORD>',
            'exchange' => 'mock-exchange',
            'dead-letter-exchange' => 'mock-dead-exchange',
            'queue' => 'mock-queue'
        ];

        $configuration = AmqpConfiguration::parse($parameters);

        $this->assertEquals('127.0.0.1', $configuration->getHost());
        $this->assertEquals('/mock-vhost/', $configuration->getVhost());<commit_msg>Update expected default values in configuration test<commit_after><?php

namespace Alchemy\Queue\Tests\Amqp;

use Alchemy\Queue\Amqp\AmqpConfiguration;

class AmqpConfigurationTest extends \PHPUnit_Framework_TestCase
{

    public function testHasDefaultValues()
    {
        $configuration = new AmqpConfiguration();

        $this->assertEquals('localhost', $configuration->getHost());
        $this->assertEquals('/', $configuration->getVhost());
        $this->assertEquals(5672, $configuration->getPort());
        $this->assertEquals('guest', $configuration->getUser());
        $this->assertEquals('guest', $configuration->getPassword());
        $this->assertEquals('alchemy-exchange', $configuration->getExchange());
        $this->assertEquals('', $configuration->getDeadLetterExchange());
        $this->assertEquals('alchemy-queue', $configuration->getQueue());

        $configuration = AmqpConfiguration::parse([]);

        $this->assertEquals('localhost', $configuration->getHost());
        $this->assertEquals('/', $configuration->getVhost());
        $this->assertEquals(5672, $configuration->getPort());
        $this->assertEquals('guest', $configuration->getUser());
        $this->assertEquals('guest', $configuration->getPassword());
        $this->assertEquals('alchemy-exchange', $configuration->getExchange());
        $this->assertEquals('', $configuration->getDeadLetterExchange());
        $this->assertEquals('alchemy-queue', $configuration->getQueue());
    }

    public function testParseCorrectlyAssignsValues()
    {
        $parameters = [
            'host' => '127.0.0.1',
            'vhost' => '/mock-vhost/',
            'port' => 5555,
            'user' => 'mock-user',
            'password' => '<PASSWORD>',
            'exchange' => 'mock-exchange',
            'dead-letter-exchange' => 'mock-dead-exchange',
            'queue' => 'mock-queue'
        ];

        $configuration = AmqpConfiguration::parse($parameters);

        $this->assertEquals('127.0.0.1', $configuration->getHost());
        $this->assertEquals('/mock-vhost/', $configuration->getVhost());
{'fraction_non_alphanumeric': 0.17932339720842205, 'fraction_numerical': 0.0113555713271824, 'mean_word_length': 3.4458464773922186, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 93, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '5199964', 'n_tokens_mistral': 1151, 'n_tokens_neox': 1074, 'n_words': 155}