/** * Attempt to create a widget of an invalid subtype */ public function testCreateSortableWidgetError() { $profile = $this->profiles('adminProfile'); $widgetLayoutBefore = $profile->profileWidgetLayout; $widgetSubtype = 'NotAWidgetClass'; $this->assertFalse(SortableWidget::subtypeisValid('profile', $widgetSubtype)); list($success, $uid) = SortableWidget::createSortableWidget($profile, $widgetSubtype, 'profile'); // ensure widget wasn't created $this->assertFalse($success); }