/**
  * Test that we can query for these tests properly
  *
  * @since 1.1.0
  *
  * @group group
  * @group destination
  * @group cookie
  * @group destination_cookie
  *
  * @covers \ingot\testing\tests\click\destination\init::get_destination_tests()
  */
 public function testQuery()
 {
     ingot_test_data_price::edd_tests();
     ingot_tests_data::make_groups();
     $x = 0;
     foreach (\ingot\testing\tests\click\destination\types::destination_types() as $type) {
         if ('hook' == $type) {
             continue;
         }
         $data = ingot_test_desitnation::create($type);
         $this->assertTrue(is_numeric($data['group_ID']));
         $the_groups[] = $data['group_ID'];
         $x++;
     }
     $groups = \ingot\testing\tests\click\destination\init::get_destination_tests();
     $this->assertSame($x, count($groups));
     $this->assertEquals($the_groups, $groups);
 }
Пример #2
0
 /**
  * Set groups property of this class
  *
  * @access protected
  *
  * @since 1.1.0
  */
 protected function set_groups()
 {
     if (!$this->groups_set) {
         $groups = init::get_destination_tests(false);
         foreach ($groups as $group) {
             $this->groups[(int) $group['ID']] = $group;
         }
         $this->groups_set = true;
     }
 }