<commit_before><?php

/*
 * This file is part of the Sylius package.
 *
 * (c) <NAME>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */


namespace spec\Sylius\Bundle\TaxationBundle\DependencyInjection\Compiler;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;

class RegisterCalculatorsPassSpec extends ObjectBehavior
{
    function it_is_initializable()
    {
        $this->shouldHaveType('Sylius\Bundle\TaxationBundle\DependencyInjection\Compiler\RegisterCalculatorsPass');
    }

    function it_is_a_coplier_pass()
    {
        $this->shouldImplement('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface');
    }

    function it_processes_the_calculators_services(ContainerBuilder $container, Definition $calculator)
    {
        $container->hasDefinition('sylius.registry.tax_calculator')->shouldBeCalled()->willReturn(true);
        $container->getDefinition('sylius.registry.tax_calculator')->shouldBeCalled()->willReturn($calculator);

        $container->findTaggedServiceIds('sylius.tax_calculator')->shouldBeCalled()->willReturn(array(
            'calculator_id' => array(
                array(
                    'calculator' => 'calculator_name'
                )
            )
        ));

        $calculator->addMethodCall(
            'register',<commit_msg>fix typo test<commit_after><?php

/*
 * This file is part of the Sylius package.
 *
 * (c) <NAME>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */


namespace spec\Sylius\Bundle\TaxationBundle\DependencyInjection\Compiler;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;

class RegisterCalculatorsPassSpec extends ObjectBehavior
{
    function it_is_initializable()
    {
        $this->shouldHaveType('Sylius\Bundle\TaxationBundle\DependencyInjection\Compiler\RegisterCalculatorsPass');
    }

    function it_is_a_compiler_pass()
    {
        $this->shouldImplement('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface');
    }

    function it_processes_the_calculators_services(ContainerBuilder $container, Definition $calculator)
    {
        $container->hasDefinition('sylius.registry.tax_calculator')->shouldBeCalled()->willReturn(true);
        $container->getDefinition('sylius.registry.tax_calculator')->shouldBeCalled()->willReturn($calculator);

        $container->findTaggedServiceIds('sylius.tax_calculator')->shouldBeCalled()->willReturn(array(
            'calculator_id' => array(
                array(
                    'calculator' => 'calculator_name'
                )
            )
        ));

        $calculator->addMethodCall(
            'register',
{'fraction_non_alphanumeric': 0.10456210456210456, 'fraction_numerical': 0.0, 'mean_word_length': 3.701095461658842, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 33, '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': '23021', 'n_tokens_mistral': 840, 'n_tokens_neox': 816, 'n_words': 131}