setUp(); } /** * available content to set * @param $content * @return bool * @author wangju 2019-05-17 21:50 */ protected function matchContent($content) { return $content['title'] && $content['text']; } /** * A basic test example. * * @return void */ public function testPushActionSingleMessage() { $result = $this->ding ->actionCard($this->title,$this->text,1) ->single("阅读全文","https://www.dingtalk.com/") ->send(); $this->assertSame([ 'errmsg' => 'ok', 'errcode' => 0 ],$result); } public function testPushActionBtnsMessageAtAllUser(){ $result = $result = $this->ding ->actionCard($this->title,$this->text,1) ->addButtons("内容不错","https://www.dingtalk.com/") ->addButtons("不感兴趣","https://www.dingtalk.com/") ->send(); $this->assertSame([ 'errmsg' => 'ok', 'errcode' => 0 ],$result); } }