Testing Examples
Examples for writing functional and unit tests for the CKEditor Image Support extension.
Table of Contents
Test Suites in the Extension
The extension's own tests are the reference for writing tests against it:
Tests/- image dialog controllerFunctional/ Controller/ Select Image Controller Test. php Tests/- frontend rendering via TypoScriptFunctional/ Controller/ Image Rendering Adapter Typo Script Test. php Tests/- DataHandler hookUnit/ Database/ Rte Images Db Hook Test. php
They use the TYPO3 testing framework with PHPUnit attributes (#).
Functional tests that need records load CSV fixtures with import.
Run Tests
Execute Test Suites
# Unit tests (Build/phpunit/UnitTests.xml)
composer ci:test:php:unit
# Functional tests (Build/phpunit/FunctionalTests.xml, needs typo3DatabaseDriver=pdo_sqlite)
composer ci:test:php:functional
Copied!
Result: Automated testing suite ✅