<?php
/**
 * Tests for HVAC_Test_Data_Generator
 */

require_once __DIR__ . '/HVAC_Test_Data_Generator.php';

class HVAC_Test_Data_Generator_Test extends WP_UnitTestCase {
    public function test_generate_event_data() {
        $event = HVAC_Test_Data_Generator::generate_event_data();
        
        $this->assertArrayHasKey('title', $event);
        $this->assertStringStartsWith('Test Event', $event['title']);
        $this->assertArrayHasKey('start_date', $event);
        $this->assertNotEmpty($event['start_date']);
    }

    public function test_generate_user_data() {
        $user = HVAC_Test_Data_Generator::generate_user_data();
        
        $this->assertArrayHasKey('user_login', $user);
        $this->assertStringStartsWith('testuser_', $user['user_login']);
        $this->assertEquals('hvac_trainer', $user['role']);
    }

    public function test_generate_multiple_events() {
        $events = HVAC_Test_Data_Generator::generate_multiple_events(3);
        
        $this->assertCount(3, $events);
        $this->assertNotEquals($events[0]['title'], $events[1]['title']);
    }

    public function test_data_overrides() {
        $custom_title = 'Custom Event Title';
        $event = HVAC_Test_Data_Generator::generate_event_data([
            'title' => $custom_title
        ]);
        
        $this->assertEquals($custom_title, $event['title']);
    }
}