Skip to content

Commit

Permalink
- fix some broken tests
Browse files Browse the repository at this point in the history
- reverted the removal of the calendar widget in default dashboard
  • Loading branch information
24198 committed Dec 21, 2017
1 parent 6933cc1 commit a5d5146
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class LoadDashboardData extends AbstractDashboardFixture implements DependentFix
protected $manager;

protected $widgets = [
// 'my_calendar' => 'remove',
'my_calendar' => 'remove',
'top_revenue_channels_widget' => [0,0],
'latest_orders_widget' => [1,0],
'recent_emails' => [1, 2],
Expand All @@ -26,7 +26,7 @@ class LoadDashboardData extends AbstractDashboardFixture implements DependentFix
public function getDependencies()
{
return [
// 'Oro\Bundle\CalendarBundle\Migrations\Data\ORM\LoadDashboardData',
'Oro\Bundle\CalendarBundle\Migrations\Data\ORM\LoadDashboardData',
'Oro\Bundle\EmailBundle\Migrations\Data\ORM\LoadDashboardData',
'Oro\Bundle\DashboardBundle\Migrations\Data\ORM\LoadDashboardData'
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ public function testUpdateInventoryItemAddLevelAndIncrease()
$result = $this->client->getResponse();
$this->assertHtmlResponseStatusCodeEquals($result, 200);

// TODO:: uncomment when MAR10001-312 will be merged
$this->assertContains('Warehouse 1', $crawler->html());
$this->assertContains('Warehouse DE 1', $crawler->html());
$this->assertContains('never_out_of_stock', $crawler->html());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function testGetBlockPrefix()
*/
public function testSubmitValid(RuleInterface $rule)
{
$form = $this->factory->create($this->formType, $rule);
$form = $this->factory->create(RuleType::class, $rule);

$this->assertSame($rule, $form->getData());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function testExecute($registryHasService, $inputService, $expectedService
->willReturn($metaData);

$this->doctrine->expects(static::once())
->method('getEntityManager')
->method('getManager')
->willReturn($em);

$context = new ActionData(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected function executeAction($context)
$service = strtolower($this->contextAccessor->getValue($context, $this->service));
/** @var ShippingAwareInterface $entity */
$entity = $this->contextAccessor->getValue($context, $this->entity);
$entityClass = $this->doctrine->getEntityManager()->getClassMetadata(get_class($entity))->getName();
$entityClass = $this->doctrine->getManager()->getClassMetadata(get_class($entity))->getName();

if (!$service || !$this->registry->hasIntegration($service) || !$this->registry->hasDataFactory($service)) {
$service = self::DEFAULT_SHIPPING_SERVICE;
Expand Down

0 comments on commit a5d5146

Please sign in to comment.