<commit_before><?php

namespace Smartbox\Integration\FrameworkBundle\Tests\Functional\Tools\Evaluator;

use Smartbox\Integration\FrameworkBundle\Tests\Functional\BaseTestCase;
use Smartbox\Integration\FrameworkBundle\Tools\Evaluator\CustomExpressionLanguageProvider;
use Smartbox\CoreBundle\Type\SerializableArray;
use Smartbox\Integration\FrameworkBundle\Core\Exchange;
use Smartbox\Integration\FrameworkBundle\Core\Messages\Message;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;

/**
 * Class CustomExpressionLanguageTest.
 * @group ExpressionLanguage
 * @coversDefaultClass \Smartbox\Integration\FrameworkBundle\Tools\Evaluator\CustomExpressionLanguageProvider
 */
class CustomExpressionLanguageTest extends BaseTestCase
{
    /** @var CustomExpressionLanguageProvider|ExpressionFunctionProviderInterface */
    protected $evaluator;

    public function setUp()
    {
        $this->bootKernel(['debug' => false]);
        $this->evaluator = static::$kernel->getContainer()->get('smartesb.util.evaluator');
    }

    public function tearDown()
    {
        $this->evaluator = null;
    }

    /**
     * @return array
     */
    public function dataProviderForExpressionsEvaluatedWithVars()
    {
        return [
            'Simple expression' => [
                'expected' => 2,
                'expression' => '1 + 1',
                'vars' => [],<commit_msg>moved expression language tests<commit_after><?php

namespace Smartbox\Integration\FrameworkBundle\Tests\Functional\Tools\Evaluator;

use Smartbox\Integration\FrameworkBundle\Tests\Functional\BaseTestCase;
use Smartbox\Integration\FrameworkBundle\Tools\Evaluator\CustomExpressionLanguageProvider;
use Smartbox\CoreBundle\Type\SerializableArray;
use Smartbox\Integration\FrameworkBundle\Core\Exchange;
use Smartbox\Integration\FrameworkBundle\Core\Messages\Message;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;

/**
 * Class CustomExpressionLanguageTest.
 * @group ExpressionLanguage
 * @coversDefaultClass \Smartbox\Integration\FrameworkBundle\Tools\Evaluator\CustomExpressionLanguageProvider
 */
class CustomExpressionLanguageTest extends KernelTestCase
{
    /** @var CustomExpressionLanguageProvider|ExpressionFunctionProviderInterface */
    protected $evaluator;

    public function setUp()
    {
        $this->bootKernel(['debug' => false]);
        $this->evaluator = static::$kernel->getContainer()->get('smartesb.util.evaluator');
    }

    public function tearDown()
    {
        $this->evaluator = null;
    }

    /**
     * @return array
     */
    public function dataProviderForExpressionsEvaluatedWithVars()
    {
        return [
            'Simple expression' => [
                'expected' => 2,
                'expression' => '1 + 1',
                'vars' => [],
{'fraction_non_alphanumeric': 0.10911701363962671, 'fraction_numerical': 0.0021536252692031586, 'mean_word_length': 3.788659793814433, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '532306', 'n_tokens_mistral': 738, 'n_tokens_neox': 731, 'n_words': 113}