public function testPluginsWithConfiguredAndExplicitStylesSets() { $configuredStylesSets = array('foo' => array(array('name' => 'Blue Title', 'element' => 'h2', 'styles' => array('color' => 'Blue')))); $explicitStylesSets = array('bar' => array(array('name' => 'CSS Style', 'element' => 'span', 'attributes' => array('class' => 'my_style')))); $this->stylesSetManagerMock->expects($this->once())->method('setStylesSets')->with($this->equalTo($explicitStylesSets)); $this->stylesSetManagerMock->expects($this->once())->method('getStylesSets')->will($this->returnValue(array_merge($explicitStylesSets, $configuredStylesSets))); $form = $this->factory->create('ckeditor', null, array('styles' => $explicitStylesSets)); $view = $form->createView(); $this->assertSame(array_merge($explicitStylesSets, $configuredStylesSets), $view->vars['styles']); }