/**
  * Cehck getting destination from meta
  *
  * @since 1.1.0
  *
  * @group group
  * @group destination
  *
  * @covers \ingot\testing\utility\destination::get_destination()
  */
 public function testGetDestination()
 {
     foreach (\ingot\testing\tests\click\destination\types::destination_types() as $type) {
         if ('hook' == $type) {
             continue;
         }
         $args = ingot_test_desitnation::group_args($type);
         $data = ingot_test_desitnation::create($type);
         $group = \ingot\testing\crud\group::read($data['group_ID']);
         $this->assertEquals($type, \ingot\testing\utility\destination::get_destination($group));
     }
 }
Beispiel #2
0
 /**
  * Check if we can count current context as a conversion, if so register it
  *
  * @access protected
  *
  * @since 1.1.0
  *
  * @param string $type Destination type
  *
  * @return bool
  */
 protected function check_if_victory($type)
 {
     foreach ($this->tracking as $group_id => $variant_id) {
         $group = $this->get_group($group_id);
         if ($group && $type === destination::get_destination($group)) {
             ingot_register_conversion($variant_id);
             return true;
         }
     }
 }