Bug #82
TYPO3CR_BaseTest uses global variables
Status: | Resolved | Start date: | ||
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Karsten Dambekalns | % Done: | 100% |
|
Category: | - | |||
Target version: | - |
Description
In order to save memory / improve performance (I assume), the TYPO3CR_BaseTest stores the Repository and Session instance into a global variable. That's bad and needs a different solution.
In general it might be that the tests could be implemented in a way which doesn't really need a repository etc. but rather a mock repository. That's very likely, especially if true unit testing is done.
Please also read Jimmy Nilssons remarks about testing repositories, that might help a little.
History
#1 Updated by Karsten Dambekalns over 7 years ago
- Status changed from New to Accepted
#2 Updated by Malte Jansen over 7 years ago
What about a repository, which only loads/registers classes for one package (or package/Classes/MyComponentDir/, if one class of this package (or ...) is called the first time?
#3 Updated by Karsten Dambekalns over 7 years ago
(In r432) TYPO3CR tests:
- NamespaceRegistryTest? now uses a mock for storage access
- No longer extending the TYPO3CR_BaseTest
Addresses issue #82
#4 Updated by Karsten Dambekalns over 7 years ago
- Status changed from Accepted to Resolved
- Target version deleted (
1) - % Done changed from 0 to 100
The BaseTest class is history now...