本文整理汇总了PHP中Symfony\Bundle\FrameworkBundle\Client::disableReboot方法的典型用法代码示例。如果您正苦于以下问题:PHP Client::disableReboot方法的具体用法?PHP Client::disableReboot怎么用?PHP Client::disableReboot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Bundle\FrameworkBundle\Client
的用法示例。
在下文中一共展示了Client::disableReboot方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testEnableRebootKernel
public function testEnableRebootKernel()
{
$mock = $this->getKernelMock();
$mock->expects($this->once())->method('shutdown');
$client = new Client($mock);
$client->disableReboot();
$client->request('GET', '/');
$client->request('GET', '/');
$client->enableReboot();
$client->request('GET', '/');
}
示例2: execute
/**
* @return $this
*/
public function execute()
{
$this->client->disableReboot();
$this->client->getKernel()->shutdown();
$this->client->getKernel()->boot();
$event = new RequestHelperEvent($this);
$event->setBody($this->body);
$this->eventDispatcher->dispatch(static::EVENT_PRE_REQUEST, $event);
$this->client->request($this->method, $this->uri, $this->parameters, $this->files, $this->servers, $event->getBody());
$this->eventDispatcher->dispatch(static::EVENT_POST_REQUEST, new RequestHelperEvent($this));
// $this->eventDispatcher->dispatch(static::EVENT_ASSERT, new RequestHelperEvent($this));
foreach (array_filter($this->assertions) as $callback) {
call_user_func($callback, $this);
}
return $this;
}