PHPUnit テスト基盤の導入#159
Draft
tanakakc wants to merge 17 commits into
Draft
Conversation
- PHP 7.4 CLI with Composer 2 - VS Code extensions: Intelephense, Xdebug 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add PHPUnit 9.6 as dev dependency - Configure phpunit.xml for test suite - Add bootstrap.php for test initialization 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Test coverage for: - h() / h_decode(): HTML escaping and decoding - is_image(): Image file detection - get_mimetype(): MIME type detection - wrap_script_tag(): JavaScript wrapping - is_url(): URL validation with protocol options - wikiescape(): Dangerous wiki tag escaping - get_bs_style(): Bootstrap class generation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Run PHPUnit tests on PHP 7.3 and 7.4 - Trigger on push to master/feature/* and PRs to master - Cache Composer dependencies for faster builds 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Use PHP 7.4 only (matches composer.lock) - Run on push to master and PRs only (avoid duplicate runs) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Migrating to GitHub Actions for CI/CD. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Trigger on version tags (v*) - Run tests before release - Build update package (excluding dev files and user data) - Create GitHub Release with update zip 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Test coverage for: - Singleton pattern (get_instance) - Value storage (setv/getv, setv_once) - Value manipulation (appendv, prependv) - One-time operations (appendv_once, prependv_once) - Template syntax conversion (convert_php) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add tests for clear, br, underline plugins - Move require_once to setUpBeforeClass in each test file - Simplify bootstrap.php to common constants only - Move qhm_template specific constants to QHMTemplateTest 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add 28 tests for plugin/button.inc.php covering: - Button types (primary, danger, success, warning, info, link) - Button sizes (large, small, mini, xs) - Button styles (block, round, gradient, ghost) - URL and page link handling with is_page() integration - XSS protection for href and target attributes - Update bootstrap.php with DATA_DIR and global variables ($BracketName, $InterWikiName) required for is_pagename() 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Ignore test data directory used for temporary wiki pages during testing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Each test file now includes a header comment specifying: - The target file being tested - The functions/classes covered by @Covers annotation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add error_reporting(E_ALL) to bootstrap.php to show all PHP notices - Configure phpunit.xml to not convert notices/warnings/deprecations to exceptions - Keeps tests passing while making PHP issues visible in output 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Define CACHE_DIR once in bootstrap.php to avoid duplicate definition - Remove CACHE_DIR definitions from individual test files - Add defined() checks for CONTENT_CHARSET and TEMPLATE_ENCODE 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Test QHM-specific extension of PukiWiki's ruby plugin: - Error message retrieval via get_qm() message system 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
PHPUnitテスト基盤を導入し、QHM固有のクラス・プラグインのテストを追加
対応予定 - QHM独自プラグイン (199件)
PukiWikiに存在しないQHM独自のプラグイン
一覧を表示
対応予定 - QHM拡張プラグイン (63件)
PukiWiki標準プラグインにQHMが機能拡張を加えたもの (get_qm/get_qt/ss_admin使用、または機能追加)
一覧を表示
対応不要 - PukiWikiバージョン差異のみ (8件)
機能拡張なし、API差異のみ
対応不要 - PukiWiki標準のまま (4件)
PukiWikiから変更されていないプラグイン
保留
※ PukiWiki https://github.com/pukiwiki/pukiwiki との実ファイル比較に基づく分類
🤖 Generated with Claude Code