fix: rewrite all unit tests to match actual class signatures

All 14 test files updated to use correct constructor patterns (array-based
value objects, dependency injection for ContentAnalyzer, etc.) and verified
method names against source.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
peptiderepo
2026-04-12 01:43:02 +07:00
parent 83567dcb1f
commit ab8d38a9c8
15 changed files with 1375 additions and 970 deletions

View File

@@ -2,17 +2,14 @@
/**
* PHPUnit bootstrap for PRAutoBlogger unit tests.
*
* Loads Brain\Monkey for WordPress function mocking,
* then requires the source files under test.
* Loads composer autoloader and defines WordPress constants.
* Brain\Monkey setup is done in BaseTestCase, not here.
*
* @package PRAutoBlogger\Tests
*/
require_once dirname( __DIR__ ) . '/vendor/autoload.php';
// Brain\Monkey sets up Patchwork & function stubs.
\Brain\Monkey\setUp();
// Define WordPress constants that source files expect.
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', '/tmp/wordpress/' );