2
WebTestCase
のメソッドを使用して、私がテストしたリクエストに使用されているメモリ全体をトレースしたいだけです。 WebTestCase::testReturnValidUser
方法内でこのような 何か:symfonyウェブテストケースでメモリ使用量をテストする方法
$client = static::createClient();
$client->enableProfiler();
$crawler = $client->request(
'GET',
$userURL
);
...
if ($profile = $client->getProfile()) {
$this->assertLessThan(10, $profile->getSomethingForMemoryConsumption())
}
追記:残念ながら、私はxhproof
をインストールすることはできません。 Brewは私自身がインストールしたphp7のxhproofを提供していないようだ。