【发布时间】:2013-05-02 10:07:12
【问题描述】:
一段时间后,我运行了这个示例测试,Drupal 批处理屏幕(带有进度条的屏幕)停止运行,我的服务器日志中没有记录任何错误,整个浏览器窗口保持冻结状态。代码很基础:
<?php
class FooTestCase extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => 'test',
'description' => 'test',
'group' => 'Foo',
);
}
public function setUp() {
parent::setUp();
}
public function testLogin() {
// The drupalCreateUser() runs fine
$user = $this->drupalCreateUser(array('access content'));
// If i comment out the following, test runs fine.
$this->drupalLogin($user);
}
}
?>
我错过了什么?
== EDIT1 ==
另一个线索:我通过 drush test-run 运行了测试,它们运行良好。
== EDIT2 ==
这原来是一个curl_setopt_array 错误,它在DrupalWebTestCase::curlInitialize() 期间返回 FALSE。该问题没有进一步进展。
== EDIT3 ==
经过更深入的调试,这被证明是 curl CURLOPT_FOLLOWLOCATION 的一个问题,它会在设置尝试时触发错误。
【问题讨论】:
标签: php unit-testing curl drupal-6 simpletest