Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 14
0.00% covered (danger)
0.00%
0 / 5
CRAP
0.00% covered (danger)
0.00%
0 / 1
ApiFlowViewTopicSummary
0.00% covered (danger)
0.00%
0 / 14
0.00% covered (danger)
0.00%
0 / 5
30
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getBlockParams
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getAction
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getAllowedParams
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 1
2
 getExamplesMessages
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace Flow\Api;
4
5use Wikimedia\ParamValidator\ParamValidator;
6
7class ApiFlowViewTopicSummary extends ApiFlowBaseGet {
8    public function __construct( $api, $modName ) {
9        parent::__construct( $api, $modName, 'vts' );
10    }
11
12    /**
13     * Taken from ext.flow.base.js
14     * @return array
15     */
16    protected function getBlockParams() {
17        return [ 'topicsummary' => $this->extractRequestParams() ];
18    }
19
20    protected function getAction() {
21        return 'view-topic-summary';
22    }
23
24    public function getAllowedParams() {
25        return [
26            'format' => [
27                ParamValidator::PARAM_TYPE => [ 'html', 'wikitext', 'fixed-html' ],
28                ParamValidator::PARAM_DEFAULT => 'fixed-html',
29            ],
30            'revId' => null,
31        ];
32    }
33
34    /**
35     * @inheritDoc
36     */
37    protected function getExamplesMessages() {
38        return [
39            'action=flow&submodule=view-topic-summary&page=Topic:S2tycnas4hcucw8w&vtsformat=wikitext&revId='
40                => 'apihelp-flow+view-topic-summary-example-1',
41        ];
42    }
43}