Development

#1900 (sfTestBrowser::isResponseHeader() generates an exception `PHP send a "warning"`)

You must first sign up to be able to contribute.

Ticket #1900 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

sfTestBrowser::isResponseHeader() generates an exception `PHP send a "warning"`

Reported by: klemen Assigned to: fabien
Priority: major Milestone: 1.0.6
Component: tests Version: 1.0.0
Keywords: lime functional test sfTestBrowser Cc:
Qualification:

Description

When checking the response header "content-type" using sfTestBrowser::isResponseHeader() in a test, PHP generates a warning and an exception is thrown that stops the functional test:

  [Exception]
  PHP send a "warning" error at /usr/share/php/symfony/test/sfTestBrowser.class.php line 238 (Invalid argument supplied for foreach())

This happens irregardless of the returned status code (tested with 200 and 302).

Change History

06/26/07 09:56:55 changed by klemen

A minimal test case:

$b = new sfTestBrowser();
$b->initialize();

$b->
   get("/some_module/some_action")->
   isStatusCode()->
   isResponseHeader("content-type", "text/html");

This code returns the above described exception.

06/26/07 14:03:04 changed by fabien

  • component changed from lime to tests.
  • milestone set to 1.0.6.

06/26/07 14:28:01 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

in r4404 and r4405