netresearch/typo3-testing-skill / skills/typo3-testing
typo3-testing
FlaggedUse when reproducing defects as failing tests, testing template or rendered output changes, confirming changes on a running TYPO3 instance, or setting up TYPO3 extension tests: unit/functional/E2E, PHPUnit 11-13, mutation testing, final-class mocks (v14), CI matrix across TYPO3 12/13/14.3 LTS, typo3-ci-workflows meta-package, CI failures. Also: transaction rollback, worker crashes, competing requests, testing-framework setup, test matrix, integration/e2e testing, coverage, test generation.
assets/bootstrap.php
View on GitHub<?php
declare(strict_types=1);
/**
* General Bootstrap for TYPO3 Extension Tests
*
* Place this file at Tests/bootstrap.php
*
* This bootstrap initializes the test environment for all test types.
* It sets up autoloading and basic TYPO3 constants.
*/
// Set timezone to avoid date/time warnings
date_default_timezone_set('UTC');
// Locate composer autoloader
$autoloadLocations = [
// Standard .Build directory (runTests.sh)
dirname(__DIR__) . '/.Build/vendor/autoload.php',
// Composer root installation
dirname(__DIR__, 3) . '/vendor/autoload.php',
// Local vendor directory
dirname(__DIR__) . '/vendor/autoload.php',
];
$autoloadFile = null;
foreach ($autoloadLocations as $location) {
if (file_exists($location)) {
$autoloadFile = $location;
break;
}
}
if ($autoloadFile === null) {
throw new RuntimeException(
'Could not find composer autoload.php. Run "composer install" first.'
);
}
require_once $autoloadFile;
// Define TYPO3 constants if not already defined
// These are needed for some TYPO3 core classes even in unit tests
if (!defined('TYPO3')) {
// TYPO3 v12+ uses this constant
define('TYPO3', true);
}
if (!defined('TYPO3_MODE')) {
// Legacy constant for backwards compatibility
define('TYPO3_MODE', 'BE');
}
if (!defined('TYPO3_REQUESTTYPE')) {
// CLI request type
define('TYPO3_REQUESTTYPE', 2);
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |