<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpKernel\Tests\DataCollector;
use Symfony\Component\HttpKernel\DataCollector\MemoryDataCollector;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class MemoryDataCollectorTest extends \PHPUnit_Framework_TestCase {
protected function setUp() {
if (!class_exists('Symfony\\Component\\HttpFoundation\\Request')) {
$this
->markTestSkipped('The "HttpFoundation" component is not available');
}
}
public function testCollect() {
$c = new MemoryDataCollector();
$c
->collect(new Request(), new Response());
$this
->assertInternalType('integer', $c
->getMemory());
$this
->assertSame('memory', $c
->getName());
}
}
Name | Description |
---|---|
MemoryDataCollectorTest |