Skip to content

Conversation

@pfefferle
Copy link
Member

Summary

Add unit tests for the namespaced classes.

Test Coverage

  • Indieweb\Indieweb - Main plugin class tests

    • Version constant and plugin constants
    • Singleton pattern
    • Hook registration
    • Action firing
  • Indieweb\Hcard\User - H-Card user class tests

    • Silos configuration
    • Address and extra fields
    • URL cleaning and validation
    • H-Card display defaults
    • H-Card rendering
  • Indieweb\Relme\Domain_Icon_Map - Domain icon mapping tests

    • Domain splitting
    • URL to icon name mapping
    • Known domains (GitHub, Twitter, Bluesky, etc.)
    • Special schemes (mailto, sms)
    • Filter application

Structure

Tests follow the same directory structure as the includes:

tests/phpunit/
├── bootstrap.php
└── tests/includes/
    ├── class-test-indieweb.php
    ├── hcard/
    │   └── class-test-user.php
    └── relme/
        └── class-test-domain-icon-map.php

@pfefferle pfefferle self-assigned this Dec 20, 2025
@pfefferle pfefferle requested a review from dshanske December 20, 2025 13:56
- Add tests for Indieweb main class
- Add tests for Hcard\User class
- Add tests for Relme\Domain_Icon_Map class
- Update phpunit.xml.dist for new test structure
- Update bootstrap.php for new structure
@pfefferle pfefferle force-pushed the feature/add-unit-tests branch from 0508591 to 2a07454 Compare December 20, 2025 14:00
@pfefferle pfefferle requested a review from a team December 20, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants