public function testRemoveWidget() { $widget = $this->getMock('Oro\\Bundle\\DashboardBundle\\Entity\\Widget'); $this->assertFalse($this->dashboard->removeWidget($widget)); $this->dashboard->addWidget($widget); $this->assertTrue($this->dashboard->hasWidget($widget)); $this->assertTrue($this->dashboard->removeWidget($widget)); $this->assertFalse($this->dashboard->hasWidget($widget)); }