/**
  * @internal should only be used for testing
  */
 public function AddGroup()
 {
     $groupName = $this->page->GetGroupName();
     $parentId = $this->page->GetParentId();
     Log::Debug('Adding new resource group. GroupName=%s, ParentId=%s', $groupName, $parentId);
     $addedGroup = $this->resourceRepository->AddResourceGroup(ResourceGroup::Create($groupName, $parentId));
     $this->page->BindNewGroup($addedGroup);
 }
 public function testAddsResourceGroup()
 {
     $name = 'gn';
     $parentId = 123;
     $group = ResourceGroup::Create($name, $parentId);
     $id = 99292;
     $this->db->_ExpectedInsertId = $id;
     $addedGroup = $this->repository->AddResourceGroup($group);
     $expectedCommand = new AddResourceGroupCommand($name, $parentId);
     $this->assertEquals($expectedCommand, $this->db->_LastCommand);
     $this->assertEquals($id, $addedGroup->id);
 }