<commit_before><?php

namespace Sonata\AdminBundle\Translator\Extractor\JMSTranslatorBundle;

use Symfony\Component\HttpKernel\Log\LoggerInterface;
use Sonata\AdminBundle\Admin\Pool;
use Sonata\AdminBundle\Admin\AdminInterface;
use JMS\TranslationBundle\Model\MessageCatalogue;
use JMS\TranslationBundle\Model\Message;
use Sonata\AdminBundle\Translator\Extractor\JMSTranslatorBundle\AdminExtractor;

/**
 * Test for AdminExtractor
 *
 * @author <NAME> <<EMAIL>>
 */
class AdminExtractorTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var AdminExtractor
     */
    private $adminExtractor;

    /**
     * @var Pool
     */
    private $pool;

    /**
     * @var AdminInterface
     */
    private $fooAdmin;

    /**
     * @var AdminInterface
     */
    private $barAdmin;

    public function setUp()
    {
        $this->fooAdmin = $this->getMock('Sonata\AdminBundle\Admin\AdminInterface');
        $this->barAdmin = $this->getMock('Sonata\AdminBundle\Admin\AdminInterface');

        //php 5.3 BC
        $fooAdmin = $this->fooAdmin;
        $barAdmin = $this->barAdmin;

        $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
        $container->expects($this->any())<commit_msg>mark test as skip if JMS Translator does not exist<commit_after><?php

namespace Sonata\AdminBundle\Translator\Extractor\JMSTranslatorBundle;

use Symfony\Component\HttpKernel\Log\LoggerInterface;
use Sonata\AdminBundle\Admin\Pool;
use Sonata\AdminBundle\Admin\AdminInterface;
use JMS\TranslationBundle\Model\MessageCatalogue;
use JMS\TranslationBundle\Model\Message;
use Sonata\AdminBundle\Translator\Extractor\JMSTranslatorBundle\AdminExtractor;

/**
 * Test for AdminExtractor
 *
 * @author <NAME> <<EMAIL>>
 */
class AdminExtractorTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var AdminExtractor
     */
    private $adminExtractor;

    /**
     * @var Pool
     */
    private $pool;

    /**
     * @var AdminInterface
     */
    private $fooAdmin;

    /**
     * @var AdminInterface
     */
    private $barAdmin;

    public function setUp()
    {
        if (!interface_exists('JMS\TranslationBundle\Translation\ExtractorInterface')) {
            $this->markTestSkipped('JMS Translator Bundle does not exist');
        }
        
        $this->fooAdmin = $this->getMock('Sonata\AdminBundle\Admin\AdminInterface');
        $this->barAdmin = $this->getMock('Sonata\AdminBundle\Admin\AdminInterface');

        //php 5.3 BC
        $fooAdmin = $this->fooAdmin;
        $barAdmin = $this->barAdmin;

        $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
        $container->expects($this->any())
{'fraction_non_alphanumeric': 0.1266197704553869, 'fraction_numerical': 0.001480932987782303, 'mean_word_length': 3.2551181102362206, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 28, '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': '6273051', 'n_tokens_mistral': 832, 'n_tokens_neox': 805, 'n_words': 132}