Пример #1
0
 public function testGetWidgetModel()
 {
     $widget = $this->getMock('Oro\\Bundle\\DashboardBundle\\Entity\\Widget');
     $widgetModel = $this->getMockBuilder('Oro\\Bundle\\DashboardBundle\\Model\\WidgetModel')->disableOriginalConstructor()->getMock();
     $this->factory->expects($this->once())->method('createWidgetModel')->with($widget)->will($this->returnValue($widgetModel));
     $this->assertEquals($widgetModel, $this->manager->getWidgetModel($widget));
 }