- new expanded extension class - use global static maps to keep track of extensions and aliases between test runs
- for some reason our extension class wasn't working correctly - we'll just remove it
- compatibilty with XenForo v2.3
- Hampel\Testing\Job\Manager updated to match changes in XF\Job\Manager, particularly XF\Job\JobParams
- Hampel\Testing\Mail\Transport replaced with Hampel\Testing\Mail\TestTransport which implements Symfony mail transport
- Hampel\Testing\Mail\Queue removed - we now simply disable queueing which results in all mails being sent via the test transport
- php 8.3 compatibility fix - ReflectionProperty::setValue with a single parameter is now deprecated; but as of php 8.1 we can simply use ReflectionClass::setStaticValue without needing to explicitly set private or protected properties as accessible
- we now need to use a minimum of php 8.1
- upgrade to PHPUnit v10.x
- allow swapping subcontainer keys using either a class or a string to define the app container key
- new option in TestCase - $addonsToLoad
- new implementation of addon isolation limiting composer autoload and extension/listener loading based on which addons are specified in TestCase
Breaking changes:
- isolateAddon function has been removed and replaced by an option in
TestCase.php
- both
TestCase.php
andCreatesApplication.php
will need to be updated in addons based on the new versions in this package
- should be returning the instance we created when swapping or faking classes
- Job Manager - getUniqueJob wasn't returning the job
- don't serialize job paramaters
- compatibility changes for XenForo v2.2
- XF 2.2 implements Swiftmailer 6 which changes some method/interface signatures
- fixed missing use clause in
Hampel\Testing\Concerns\InteractsWithFilesystem
trait
- fixed typo in function name:
Hampel\Testing\Concerns\InteractsWithSimpleCache::assertSimpleCacheEqual()
=>assertSimpleCacheEquals()
andassertSimpleCacheNotEqual()
=>assertSimpleCacheNotEquals()
- close the database connection on tearDown to avoid connection limit issues (unless it's been mocked)
- Feature: added new functionality to Interacts with Container
- mockService
- Feature: Interacts with Http - adds:
- fakesHttp
- Feature: added new functionality to Interacts with Extension
- isolateAddon
- Feature: Interacts with Registry - adds:
- fakesRegistry
- Feature: Interacts with Filesystem - adds:
- swapFs
- mockFs
- bugfix: after mocking the database, set up the entity manager again, so we get the mocked database
- bugfix: should pass options array through to parent
- bugfix: cleaned up function visibility for consistency
- bugfix: override protected function preLoadData so we can call it directly when faking the registry
- first released version
- The following functionality is included:
- mockDatabase
- mockRepository
- mockFinder
- mockEntity
- mockRequest
- fakesErrors
- fakesJobs
- fakesLogger
- fakesMail
- fakesSimpleCache
- assertBbCode
- expectPhrase
- setOption & setOptions
- setTestTime