wp-github-updater/phpunit.xml
Miguel Colmenares 1caafb51df feat: Complete test suite implementation with real GitHub API testing
- Add comprehensive test suite: 51 tests, 130 assertions, 100% pass rate
- Implement real GitHub API integration tests (9 tests)
- Add WordPress Test Suite integration with mock plugin
- Create test runner script with interactive installation
- Consolidate documentation into README, CHANGELOG, and copilot-instructions

Test Coverage:
- Unit Tests (3): Configuration and core functionality
- Integration Tests (22): Real GitHub API, download filters, config integration
- WordPress Tests (26): Hooks, filters, and plugin integration

Testing Infrastructure:
- WordPress Test Suite bootstrap with automatic detection
- Mock plugin for realistic WordPress environment testing
- Real HTTP requests to production GitHub repositories
- Performance verification (< 10ms cached API calls)

Documentation:
- Centralized all docs into 3 files (README, CHANGELOG, copilot-instructions)
- Removed docs/ directory (7 MD files consolidated)
- Added testing guide to README Development section
- Updated copilot-instructions with documentation policy

Real GitHub API Testing:
- Repository: SilverAssist/silver-assist-post-revalidate
- Tests version fetching, caching, update detection
- Validates asset patterns and release metadata
- Confirms production repository compatibility

Breaking: Requires PHP 8.0+, WordPress 6.0+, PHPUnit 9.6.29
2025-10-10 17:00:18 -05:00

37 lines
1.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
bootstrap="tests/bootstrap.php"
backupGlobals="false"
colors="true"
verbose="true">
<testsuites>
<testsuite name="unit">
<directory>tests/Unit</directory>
</testsuite>
<testsuite name="integration">
<directory>tests/Integration</directory>
</testsuite>
<testsuite name="wordpress">
<directory>tests/WordPress</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="php://stdout" showUncoveredFiles="false"/>
</report>
</coverage>
<php>
<!-- Environment variable for WordPress Test Suite directory -->
<!-- Set this to enable WordPress integration tests -->
<!-- Example: export WP_TESTS_DIR=/tmp/wordpress-tests-lib -->
<env name="WP_TESTS_DIR" value="" force="false"/>
<!-- WordPress Core directory (auto-detected if not set) -->
<env name="WP_CORE_DIR" value="" force="false"/>
</php>
</phpunit>