1313 *
1414 */
1515
16- use TYPO3 \ CMS \ Core \ Tests \ Functional \ Framework \ Frontend \Response ;
17- use TYPO3 \ CMS \ Core \ Tests \FunctionalTestCase ;
16+ use Nimut \ TestingFramework \ Http \Response ;
17+ use Nimut \ TestingFramework \ TestCase \FunctionalTestCase ;
1818use TYPO3 \CMS \Core \Utility \GeneralUtility ;
1919
2020/**
@@ -32,6 +32,19 @@ abstract class AbstractRenderingTestCase extends FunctionalTestCase
3232 */
3333 protected $ coreExtensionsToLoad = array ('fluid ' );
3434
35+ /**
36+ * Avoid serlialization of the test system object
37+ *
38+ * @return array
39+ */
40+ public function __sleep ()
41+ {
42+ $ objectVars = get_object_vars ($ this );
43+ unset($ objectVars ['testSystem ' ]);
44+
45+ return $ objectVars ;
46+ }
47+
3548 public function setUp ()
3649 {
3750 parent ::setUp ();
@@ -85,21 +98,17 @@ protected function fetchFrontendResponse(array $requestArguments, $failOnFailure
8598 $ requestUrl = '/? ' . GeneralUtility::implodeArrayForUrl ('' , $ requestArguments );
8699 }
87100
88- if (property_exists ($ this , 'instancePath ' )) {
89- $ instancePath = $ this ->instancePath ;
90- } else {
91- $ instancePath = ORIGINAL_ROOT . 'typo3temp/functional- ' . substr (sha1 (get_class ($ this )), 0 , 7 );
92- }
93101 $ arguments = array (
94- 'documentRoot ' => $ instancePath ,
102+ 'documentRoot ' => $ this -> getInstancePath () ,
95103 'requestUrl ' => 'http://localhost ' . $ requestUrl ,
96104 );
97105
98- $ template = new \Text_Template (ORIGINAL_ROOT . ' typo3/sysext/core/Tests/Functional/Fixtures/ Frontend/request .tpl ' );
106+ $ template = new \Text_Template (' ntf:// Frontend/Request .tpl ' );
99107 $ template ->setVar (
100108 array (
101109 'arguments ' => var_export ($ arguments , true ),
102110 'originalRoot ' => ORIGINAL_ROOT ,
111+ 'ntfRoot ' => __DIR__ . '/../../.Build/vendor/nimut/testing-framework/ ' ,
103112 )
104113 );
105114
@@ -108,7 +117,7 @@ protected function fetchFrontendResponse(array $requestArguments, $failOnFailure
108117 $ result = json_decode ($ response ['stdout ' ], true );
109118
110119 if ($ result === null ) {
111- $ this ->fail ('Frontend Response is empty ' );
120+ $ this ->fail ('Frontend Response is empty: ' . $ response [ ' stdout ' ] . $ response [ ' stderr ' ] );
112121 }
113122
114123 if ($ failOnFailure && $ result ['status ' ] === Response::STATUS_Failure) {
0 commit comments