本文整理汇总了PHP中Piwik\WidgetsList::remove方法的典型用法代码示例。如果您正苦于以下问题:PHP WidgetsList::remove方法的具体用法?PHP WidgetsList::remove怎么用?PHP WidgetsList::remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\WidgetsList
的用法示例。
在下文中一共展示了WidgetsList::remove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testRemove
/**
* @group Core
*/
public function testRemove()
{
// setup the access layer
$pseudoMockAccess = new FakeAccess();
FakeAccess::$superUser = true;
Access::setSingletonInstance($pseudoMockAccess);
Fixture::createWebsite('2009-01-04 00:11:42', true);
API::getInstance()->addGoal(1, 'Goal 1 - Thank you', 'title', 'Thank you', 'contains', $caseSensitive = false, $revenue = 10, $allowMultipleConversions = 1);
$_GET['idSite'] = 1;
WidgetsList::_reset();
$widgets = WidgetsList::get();
$this->assertCount(14, $widgets);
WidgetsList::remove('SEO', 'NoTeXiStInG');
$widgets = WidgetsList::get();
$this->assertCount(14, $widgets);
$this->assertArrayHasKey('SEO', $widgets);
$this->assertCount(2, $widgets['SEO']);
WidgetsList::remove('SEO', 'SEO_SeoRankings');
$widgets = WidgetsList::get();
$this->assertCount(1, $widgets['SEO']);
WidgetsList::remove('SEO');
$widgets = WidgetsList::get();
$this->assertArrayNotHasKey('SEO', $widgets);
WidgetsList::_reset();
}