forked from liip/LiipFunctionalTestBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQueryCountClient.php
More file actions
32 lines (25 loc) · 779 Bytes
/
QueryCountClient.php
File metadata and controls
32 lines (25 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
namespace Liip\FunctionalTestBundle;
use Symfony\Bundle\FrameworkBundle\Client;
class QueryCountClient extends Client
{
/** @var QueryCounter */
private $queryCounter;
public function setQueryCounter(QueryCounter $queryCounter)
{
$this->queryCounter = $queryCounter;
}
public function request(
$method,
$uri,
array $parameters = array(),
array $files = array(),
array $server = array(),
$content = null,
$changeHistory = true
) {
$crawler = parent::request($method, $uri, $parameters, $files, $server, $content, $changeHistory);
$this->queryCounter->checkQueryCount($this->getProfile()->getCollector('db')->getQueryCount());
return $crawler;
}
}