public function testAddActionAsObject() { $a = new Attachment(['fallback' => 'Fallback', 'text' => 'Text']); $ac = new AttachmentAction(['name' => 'Name 1', 'text' => 'Text 1', 'style' => 'default', 'type' => 'button', 'value' => 'Value 1', 'confirm' => ['title' => 'Title 1', 'text' => 'Text 1', 'ok_text' => 'OK Text 1', 'dismiss_text' => 'Dismiss Text 1']]); $a->addAction($ac); $actions = $a->getActions(); $this->assertSame(1, count($actions)); $this->assertSame($ac, $actions[0]); }