src/Oro/Bundle/ChartBundle/Tests/Unit/Model/ChartViewBuilderTest.php 1 location
|
@@ 34-46 (lines=13) @@
|
31 |
|
*/ |
32 |
|
protected $builder; |
33 |
|
|
34 |
|
protected function setUp() |
35 |
|
{ |
36 |
|
$this->configProvider = $this->getMockBuilder('Oro\Bundle\ChartBundle\Model\ConfigProvider') |
37 |
|
->disableOriginalConstructor() |
38 |
|
->getMock(); |
39 |
|
$this->transformerFactory = $this |
40 |
|
->getMockBuilder('Oro\Bundle\ChartBundle\Model\Data\Transformer\TransformerFactory') |
41 |
|
->disableOriginalConstructor() |
42 |
|
->getMock(); |
43 |
|
$this->twig = $this->getMock('Twig_Environment'); |
44 |
|
|
45 |
|
$this->builder = new ChartViewBuilder($this->configProvider, $this->transformerFactory, $this->twig); |
46 |
|
} |
47 |
|
|
48 |
|
public function testSetData() |
49 |
|
{ |
src/Oro/Bundle/NavigationBundle/Tests/Unit/Menu/NavigationItemBuilderTest.php 1 location
|
@@ 30-38 (lines=9) @@
|
27 |
|
*/ |
28 |
|
protected $factory; |
29 |
|
|
30 |
|
protected function setUp() |
31 |
|
{ |
32 |
|
$this->securityContext = $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface'); |
33 |
|
$this->em = $this->getMockBuilder('Doctrine\ORM\EntityManager') |
34 |
|
->disableOriginalConstructor() |
35 |
|
->getMock(); |
36 |
|
$this->factory = $this->getMock('Oro\Bundle\NavigationBundle\Entity\Builder\ItemFactory'); |
37 |
|
$this->builder = new NavigationItemBuilder($this->securityContext, $this->em, $this->factory); |
38 |
|
} |
39 |
|
|
40 |
|
public function testBuildAnonUser() |
41 |
|
{ |
src/Oro/Bundle/NavigationBundle/Tests/Unit/Menu/NavigationMostviewedBuilderTest.php 1 location
|
@@ 31-40 (lines=10) @@
|
28 |
|
*/ |
29 |
|
protected $factory; |
30 |
|
|
31 |
|
protected function setUp() |
32 |
|
{ |
33 |
|
$this->securityContext = $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface'); |
34 |
|
$this->em = $this->getMockBuilder('Doctrine\ORM\EntityManager') |
35 |
|
->disableOriginalConstructor() |
36 |
|
->getMock(); |
37 |
|
$this->factory = $this->getMock('Oro\Bundle\NavigationBundle\Entity\Builder\ItemFactory'); |
38 |
|
|
39 |
|
$this->builder = new NavigationMostviewedBuilder($this->securityContext, $this->em, $this->factory); |
40 |
|
} |
41 |
|
|
42 |
|
public function testBuild() |
43 |
|
{ |
src/Oro/Bundle/WorkflowBundle/Tests/Unit/Datagrid/GridEntityNameProviderTest.php 1 location
|
@@ 29-46 (lines=18) @@
|
26 |
|
*/ |
27 |
|
protected $provider; |
28 |
|
|
29 |
|
protected function setUp() |
30 |
|
{ |
31 |
|
$this->em = $this->getMockBuilder('Doctrine\ORM\EntityManager') |
32 |
|
->disableOriginalConstructor() |
33 |
|
->getMock(); |
34 |
|
$this->configProvider = $this->getMockBuilder('Oro\Bundle\EntityConfigBundle\Provider\ConfigProvider') |
35 |
|
->disableOriginalConstructor() |
36 |
|
->getMock(); |
37 |
|
$this->translator = $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface') |
38 |
|
->getMock(); |
39 |
|
|
40 |
|
$this->provider = new GridEntityNameProvider( |
41 |
|
$this->configProvider, |
42 |
|
$this->em, |
43 |
|
$this->translator |
44 |
|
); |
45 |
|
$this->provider->setEntityName('test'); |
46 |
|
} |
47 |
|
|
48 |
|
public function testGetRelatedEntitiesChoiceConfigurable() |
49 |
|
{ |