/** * Test default threshold filter * * @since 0.1.1 * * @covers \ingot\testing\utility\defaults::threshold() * @covers ingot_default_threshold */ public function testThresholdFilter() { add_filter('ingot_default_threshold', function () { return 42; }); $this->assertEquals(42, \ingot\testing\utility\defaults::threshold()); }
/** * Calculate correct initial value * * @access protected * * @since 1.1.0 * * @param \ingot\testing\object\group $group */ protected function set_initial(\ingot\testing\object\group $group) { $average = sessions::get_instance()->get_average($this->use_unique($group->get_group_config())); if (!is_numeric($average) || 0 == $average || $average < defaults::threshold()) { $this->initial = defaults::initial(); } else { $this->initial = $average; } }