Ejemplo n.º 1
0
 /** @test */
 function it_add_multiple_categories_to_a_group(NotifynderGroupCategoryDB $groupCategoryDB)
 {
     $group_name = 'mygroup';
     $category1 = 'mycategory1';
     $category2 = 'mycategory2';
     $groupCategoryDB->addMultipleCategoriesToGroup($group_name, [$category1, $category2])->shouldBeCalled()->willReturn(2);
     $this->addMultipleCategoriesToGroup($group_name, $category1, $category2)->shouldReturn(2);
 }
Ejemplo n.º 2
0
 /**
  * Add Multiple categories in a group
  * First parameter is the group name
  * all the rest are categories.
  *
  * @return mixed
  */
 public function addMultipleCategoriesToGroup()
 {
     $args = func_get_args();
     // First parameter is the group name
     $groupName = array_shift($args);
     $names = is_array($args[0]) ? $args[0] : $args;
     return $this->groupCategory->addMultipleCategoriesToGroup($groupName, $names);
 }