register_hooks(); $hooks = array_column( $GLOBALS['pgm_test_state']['actions'], 'hook' ); pgm_assert( in_array( PGM_CRON_HOOK, $hooks, true ), 'register_hooks: pgm_weekly_probe action registered' ); // ── Test: hook constant is correct string ──────────────────────────────── pgm_assert_equals( 'pgm_weekly_probe', PGM_CRON_HOOK, 'PGM_CRON_HOOK: constant value correct' ); // ── Test: PGM_Activator calls schedule_weekly ──────────────────────────── pgm_test_reset(); // Seed options so seed_defaults() doesn't fail. PGM_Activator::activate(); pgm_assert( PGM_Cron::is_scheduled(), 'PGM_Activator::activate: weekly cron scheduled after activation' ); // ── Test: PGM_Deactivator calls clear_schedule ─────────────────────────── PGM_Deactivator::deactivate(); pgm_assert( ! PGM_Cron::is_scheduled(), 'PGM_Deactivator::deactivate: cron cleared after deactivation' ); exit( pgm_test_summary() );