<commit_before><?php

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

namespace Snc\RedisBundle\Tests;

use Symfony\Bundle\FrameworkBundle\Console\Application;

/**
 * Base Class for command tests
 *
 * @author <NAME> <<EMAIL>>
 */
abstract class CommandTestCase extends \PHPUnit_Framework_TestCase
{

    /**
     * @var \Symfony\Bundle\FrameworkBundle\Console\Application
     */
    protected $application;

    /**
     * @var \Predis\Client
     */
    protected $predisClient;

    /**
     * @var \Snc\RedisBundle\Client\Phpredis\Client
     */
    protected $phpredisClient;

    /**
     * @var \Symfony\Component\DependencyInjection\ContainerInterface
     */
    protected $container;

    /**
     * SetUp called before each tests, setting up the environment (application, globally used mocks)
     */
    public function setUp()
    {
        $kernel = $this->getMockBuilder('\\Symfony\\Component\\HttpKernel\\Kernel')
            ->disableOriginalConstructor()
            ->getMock();
        $this->application = new Application($kernel);

        $this->container = $this->getMock('\\Symfony\\Component\\DependencyInjection\\ContainerInterface');

        $command = $this->getCommand();
        $this->application->add($command);
        $command->setContainer($this->container);
    }<commit_msg>Fix class not autoloaded when mocked<commit_after><?php

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

namespace Snc\RedisBundle\Tests;

use Symfony\Bundle\FrameworkBundle\Console\Application;
use Snc\RedisBundle\Client\Phpredis\Client as PhpredisClient;

/**
 * Base Class for command tests
 *
 * @author <NAME> <<EMAIL>>
 */
abstract class CommandTestCase extends \PHPUnit_Framework_TestCase
{

    /**
     * @var \Symfony\Bundle\FrameworkBundle\Console\Application
     */
    protected $application;

    /**
     * @var \Predis\Client
     */
    protected $predisClient;

    /**
     * @var PhpredisClient
     */
    protected $phpredisClient;

    /**
     * @var \Symfony\Component\DependencyInjection\ContainerInterface
     */
    protected $container;

    /**
     * SetUp called before each tests, setting up the environment (application, globally used mocks)
     */
    public function setUp()
    {
        $kernel = $this->getMockBuilder('\\Symfony\\Component\\HttpKernel\\Kernel')
            ->disableOriginalConstructor()
            ->getMock();
        $this->application = new Application($kernel);

        $this->predisClient = $this->getMock('\\Predis\\Client');

        $this->phpredisClient = $this->getMockBuilder('PhpredisClient')
            ->disableOriginalConstructor()
            ->getMock();

        $this->container = $this->getMock('\\Symfony\\Component\\DependencyInjection\\ContainerInterface');

        $command = $this->getCommand();
        $this->application->add($command);
        $command->setContainer($this->container);
    }
{'fraction_non_alphanumeric': 0.13288009888751545, 'fraction_numerical': 0.0, 'mean_word_length': 2.858164481525626, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 43, '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': '4005910', 'n_tokens_mistral': 901, 'n_tokens_neox': 883, 'n_words': 201}