Nimut / testing-framework

TYPO3 testing framework that provides base classes and configuration for PHPUnit tests
GNU General Public License v2.0
52 stars 25 forks source link

Is there an option to test real http requests? #113

Open addorange opened 5 years ago

addorange commented 5 years ago

Hi there,

I am looking for an option to test real http requests like posting to a specific url and checking the database afterwards. Is there any option to make this happen with TYPO3/Extbase or the current testing-framework?

Cheers

Christian

mbrodala commented 4 years ago

Well, you could use e.g. the RequestFactory to perform a real HTTP request and then use the regular DB API to do your checks. If you want to do this from a functional test case you could use $this->getInstancePath() to get the web path (where index.php lies) to the test instance for that test.