public function group($name) { if (isset($this->groups[$name])) { return $this->groups[$name]; } $this->groups[$name] = new WidgetGroup($name, $this->app); return $this->groups[$name]; }
public function testItGrantsAccessToWidgetGroup() { $groupObject = $this->collection->group('sidebar'); $expectedObject = new WidgetGroup('sidebar', new TestApplicationWrapper()); $this->assertEquals($expectedObject, $groupObject); }