<commit_before><?php

namespace Oro\Bundle\DashboardBundle\Tests\Unit\DependencyInjection;

use Oro\Bundle\DashboardBundle\DependencyInjection\OroDashboardExtension;
use Oro\Bundle\DashboardBundle\Tests\Unit\Fixtures\SecondTestBundle\SecondTestBundle;
use Oro\Bundle\DashboardBundle\Tests\Unit\Fixtures\FirstTestBundle\FirstTestBundle;

class OroDashboardExtensionTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var OroDashboardExtension
     */
    protected $target;

    protected function setUp()
    {
        $this->target = new OroDashboardExtension();
    }

    public function testLoad()
    {
        $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder');
        $container->expects($this->once())
            ->method('getParameter')
            ->will($this->returnValue(array(new FirstTestBundle(), new SecondTestBundle())));
        $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition');

        $items = array(
            'create' => array(
                'label'            => 'Create opportunity',
                'route'            => 'orocrm_sales_opportunity_create',
                'acl'              => 'orocrm_sales_opportunity_create',
                'route_parameters' => array()
            ),
            'index'  => array(
                'label'            => 'List',
                'route'            => 'orocrm_sales_opportunity_index',
                'acl'              => 'orocrm_sales_opportunity_view',
                'route_parameters' => array()<commit_msg>BAP-3858: Possibility to override widget configuration<commit_after><?php

namespace Oro\Bundle\DashboardBundle\Tests\Unit\DependencyInjection;

use Oro\Bundle\DashboardBundle\DependencyInjection\OroDashboardExtension;
use Oro\Component\Config\CumulativeResourceManager;

class OroDashboardExtensionTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var OroDashboardExtension
     */
    protected $target;

    protected function setUp()
    {
        $this->target = new OroDashboardExtension();
    }

    public function testLoad()
    {
        $container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder');
        $firstBundle = 'Oro\Bundle\DashboardBundle\Tests\Unit\Fixtures\FirstTestBundle\FirstTestBundle';
        $secondBundle = 'Oro\Bundle\DashboardBundle\Tests\Unit\Fixtures\SecondTestBundle\SecondTestBundle';
        CumulativeResourceManager::getInstance()->setBundles(array($firstBundle, $secondBundle));
        $definition = $this->getMock('Symfony\Component\DependencyInjection\Definition');

        $items = array(
            'create' => array(
                'label'            => 'Create opportunity',
                'route'            => 'orocrm_sales_opportunity_create',
                'acl'              => 'orocrm_sales_opportunity_create',
                'route_parameters' => array()
            ),
            'index'  => array(
                'label'            => 'List',
                'route'            => 'orocrm_sales_opportunity_index',
                'acl'              => 'orocrm_sales_opportunity_view',
                'route_parameters' => array()
{'fraction_non_alphanumeric': 0.1137780548628429, 'fraction_numerical': 0.0012468827930174563, 'mean_word_length': 2.472943722943723, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, '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': '4560223', 'n_tokens_mistral': 884, 'n_tokens_neox': 861, 'n_words': 120}