コード例 #1
0
ファイル: Item.php プロジェクト: SRMSE/cron-wikidata
 /**
  * Removes the sitelink with specified site ID if the Item has such a sitelink.
  *
  * @deprecated since 0.8, use getSiteLinkList()->removeLinkWithSiteId() instead.
  * @since 0.1
  *
  * @param string $siteId the target site's id
  */
 public function removeSiteLink($siteId)
 {
     $this->siteLinks->removeLinkWithSiteId($siteId);
 }
コード例 #2
0
 public function testGivenUnknownId_removeSiteWithIdDoesNoOp()
 {
     $list = new SiteLinkList(array(new SiteLink('foo', 'spam'), new SiteLink('bar', 'hax')));
     $expected = clone $list;
     $list->removeLinkWithSiteId('baz');
     $this->assertTrue($expected->equals($list));
 }