| @@ 32-48 (lines=17) @@ | ||
| 29 | /** @var AverageLifetimeWidgetProvider */ |
|
| 30 | protected $provider; |
|
| 31 | ||
| 32 | protected function setUp() |
|
| 33 | { |
|
| 34 | $this->registry = $this->getMock('Doctrine\Common\Persistence\ManagerRegistry'); |
|
| 35 | $this->localeSettings = $this->getMockBuilder('Oro\Bundle\LocaleBundle\Model\LocaleSettings') |
|
| 36 | ->disableOriginalConstructor()->getMock(); |
|
| 37 | $this->aclHelper = $this->getMockBuilder('Oro\Bundle\SecurityBundle\ORM\Walker\AclHelper') |
|
| 38 | ->disableOriginalConstructor()->getMock(); |
|
| 39 | $this->dateFilterProcessor = $this->getMockBuilder('Oro\Bundle\DashboardBundle\Filter\DateFilterProcessor') |
|
| 40 | ->disableOriginalConstructor()->getMock(); |
|
| 41 | ||
| 42 | $this->provider = new AverageLifetimeWidgetProvider( |
|
| 43 | $this->registry, |
|
| 44 | $this->localeSettings, |
|
| 45 | $this->aclHelper, |
|
| 46 | $this->dateFilterProcessor |
|
| 47 | ); |
|
| 48 | } |
|
| 49 | ||
| 50 | protected function tearDown() |
|
| 51 | { |
|
| @@ 49-70 (lines=22) @@ | ||
| 46 | /** |
|
| 47 | * {@inheritdoc} |
|
| 48 | */ |
|
| 49 | protected function setUp() |
|
| 50 | { |
|
| 51 | $this->registry = $this->getMockBuilder('Doctrine\Bundle\DoctrineBundle\Registry') |
|
| 52 | ->disableOriginalConstructor() |
|
| 53 | ->getMock(); |
|
| 54 | $this->aclHelper = $this->getMockBuilder('Oro\Bundle\SecurityBundle\ORM\Walker\AclHelper') |
|
| 55 | ->disableOriginalConstructor() |
|
| 56 | ->getMock(); |
|
| 57 | $this->dateFilterProcessor = $this->getMockBuilder('Oro\Bundle\DashboardBundle\Filter\DateFilterProcessor') |
|
| 58 | ->disableOriginalConstructor() |
|
| 59 | ->getMock(); |
|
| 60 | $this->ownerHelper = $this->getMockBuilder('Oro\Bundle\UserBundle\Dashboard\OwnerHelper') |
|
| 61 | ->disableOriginalConstructor() |
|
| 62 | ->getMock(); |
|
| 63 | ||
| 64 | $this->provider = new OpportunityByStatusProvider( |
|
| 65 | $this->registry, |
|
| 66 | $this->aclHelper, |
|
| 67 | $this->dateFilterProcessor, |
|
| 68 | $this->ownerHelper |
|
| 69 | ); |
|
| 70 | } |
|
| 71 | ||
| 72 | /** |
|
| 73 | * @param WidgetOptionBag $widgetOptions |
|