-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MAINTENANCE] Add tests for Controller package #954
base: master
Are you sure you want to change the base?
Conversation
f31a8fb
to
eb756a2
Compare
8ef040a
to
2f9eb29
Compare
Co-authored-by: Sebastian Meyer <[email protected]>
foreach ($databaseFixtures as $filePath) { | ||
$this->importCSVDataSet($filePath); | ||
} | ||
$this->persistenceManager = $this->objectManager->get(PersistenceManager::class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be the problem why the tests fail. $this->objectManager->get()
throws the error Call to a member function get() on null
, so $this->objectManager
isn't initialized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fails because as of version 12 the GeneralUtilityManager is used to get an instance of a class. However, if I change this, all tests fail. The response only contains an empty string. This must be related to the changes to version 12.
$this->persistenceManager = GeneralUtility::makeInstance(PersistenceManager::class);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this fixed the issue. Now the tests are running for both, v11 and v12. Unfortunately, some of the tests fail...
Tests for CalendarController will be added in a separate pull request.Update: Added tests for CalendarController in another commit.