File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,17 @@ public function wiki_page_ids() {
7474 return array_map (fn ( $ w ) => $ w ->id , $ list );
7575 }
7676
77+ /**
78+ * @return WikiTag[]
79+ */
80+ public function wiki_tags (){
81+ return $ this ->api ( WikiTag::class,
82+ 'getWikiPageTagList ' ,
83+ ['query_options ' =>['projectIdOrKey ' => $ this ->id ]],
84+ $ this
85+ );
86+ }
87+
7788 /**
7889 * @return array|\Takuya\BacklogApiClient\Models\Team[]
7990 */
Original file line number Diff line number Diff line change 66use Takuya \BacklogApiClient \Models \WikiHistory ;
77use Takuya \BacklogApiClient \Models \WikiPage as WikiPage ;
88use Takuya \BacklogApiClient \Models \WikiPageAttachment ;
9+ use Takuya \BacklogApiClient \Models \WikiTag ;
910
1011class BacklogProjectWikiModelTest extends TestCaseBacklogModels {
1112
13+ public function test_get_wiki_tag_list () {
14+
15+ $ project = null ;
16+ $ tags = null ;
17+ foreach ( $ this ->cli ->space ()->my_projects () as $ project ) {
18+ $ tags = $ project ->wiki_tags ();
19+ if (sizeof ($ tags )>0 ){
20+ break ;
21+ }
22+ }
23+ if (empty ($ project )){
24+ throw new \RuntimeException ('Wikiタグが付与されたプロジェクトがありません。作成してください。 ' );
25+ }
26+ $ this ->assertIsArray ($ tags );
27+ $ this ->assertNotEmpty ($ tags );
28+ $ this ->assertIsClass (WikiTag::class,$ tags [0 ]);
29+ }
1230
1331 public function test_get_wiki_pages_in_a_project () {
1432 foreach ( $ this ->cli ->space ()->projects ( Backlog::PROJECTS_ONLY_MINE ) as $ project ) {
You can’t perform that action at this time.
0 commit comments