/** * @dataProvider buttonValuesProvider() * * @param $label * @param $priority * @param $type * @param array $expect */ public function testAddButton($label, $priority, $type, $expect = []) { $expectWith = ['type' => 'Button', 'name' => $expect['name'], 'options' => ['label' => $expect['label']], 'attributes' => ['class' => 'btn btn-' . $expect['class'], 'type' => $type]]; $this->target->expects($this->once())->method('add')->with($expectWith, ['priority' => $priority]); $this->target->addButton($label, $priority, $type); }