Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (27 sloc) 0.989 kB
<?php
/*
* This file is part of the Doctrine MongoDBBundle
*
* The code was originally distributed inside the Symfony framework.
*
* (c) Fabien Potencier <fabien@symfony.com>
* (c) Doctrine Project
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Doctrine\Bundle\MongoDBBundle\Tests\DataCollector;
use Doctrine\Bundle\MongoDBBundle\DataCollector\StandardDataCollector;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class StandardDataCollectorTest extends \PHPUnit_Framework_TestCase
{
public function testCollect()
{
$collector = new StandardDataCollector();
$collector->logQuery(array('foo' => 'bar'));
$collector->collect(new Request(), new Response());
$this->assertEquals(1, $collector->getQueryCount());
$this->assertEquals(array('{"foo":"bar"}'), $collector->getQueries());
}
}
Jump to Line
Something went wrong with that request. Please try again.