Open arun160411 opened 7 years ago
here is the test and below the failure
<?php namespace Tests\Functional; class AddRequestCest { /**
*/ public function return_the_correct_result( \FunctionalTester $I, \Codeception\Example $example ) { $first = $example[0]; $second = $example[1];
// $I->amOnPage( "/wp-json/calc/add/{$first}/{$second}" );
$I->amOnPage( "/" );
$I->seeResponseCodeIs( 200 );
$I->seeOptionInDatabase( [ 'option_name' => '_transient_last_operation' ] );
} }
Codeception PHP Testing Framework v2.2.11 Powered by PHPUnit 5.7.19 by Sebastian Bergmann and contributors.
Running as single site
AddRequestCest: Return_the_correct_result | 5,4 Signature: Tests\Functional\AddRequestCest:return_the_correct_result Test: tests/functional/AddRequestCest.php:return_the_correct_result Scenario -- I am on page "/" [Cookie Jar] ["wordpress_test_cookie=WP+Cookie+check; path=/; httponly"] [Request Headers] [] [Page] / [Response] 500 [Request Cookies] {"wordpress_test_cookie":"WP Cookie check"} [Response Headers] {"Content-type":"text/html; charset=UTF-8","Set-Cookie":["wordpress_test_cookie=WP Cookie check"]} I see response code is 200 FAIL
Time: 1.62 seconds, Memory: 30.00MB
There was 1 failure:
1) AddRequestCest: Return_the_correct_result | 5,4 Test tests/functional/AddRequestCest.php:return_the_correct_result Step See response code is 200 Fail Expected HTTP Status Code: 200 (OK). Actual Status Code: 500 (Internal Server Error) Failed asserting that 500 matches expected 200.
Scenario Steps:
FAILURES! Tests: 1, Assertions: 1, Failures: 1.
Hi,
i am new to php and codeception. im trying to run the functional tests of this project in my local machine and the tests would fail while asserting 200 server response. the response seems to be 500. tried hard to figure out why, but couldn't. could you let me know the reason.
im using MAMP and configured Functional.yml file according to my local settings.
class_name: FunctionalTester modules: enabled: