예제 #1
0
 public function test_configureWidget_shouldMixinWidgetParametersIfSet()
 {
     $widgets = WidgetsList::get();
     $this->assertCount(0, $widgets);
     $this->advancedReport->set('widgetParams', array('foo' => 'bar'));
     $this->advancedReport->configureWidget(WidgetsList::getInstance());
     $widgets = WidgetsList::get();
     $this->assertCount(1, $widgets);
     $this->assertEquals(array('module' => 'TestPlugin', 'action' => 'getAdvancedReport', 'foo' => 'bar'), $widgets['Goals_Goals'][0]['parameters']);
 }