Skip to content

Instantly share code, notes, and snippets.

@kriswallsmith
Created February 23, 2012 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kriswallsmith/1888621 to your computer and use it in GitHub Desktop.
Save kriswallsmith/1888621 to your computer and use it in GitHub Desktop.
<?php
namespace Kris\JunkBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
/**
* @dataProvider asdf
*/
public function testIndex()
{
$client = static::createClient();
$crawler = $client->request('GET', '/hello/Fabien');
$this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0);
}
public function asdf()
{
return array_fill(0, 500, array());
}
}
~/Sites/symfony/standard (2.0) $ phpunit -c app/
PHPUnit 3.6.10 by Sebastian Bergmann.
Configuration read from /Users/kriswallsmith/Sites/symfony/standard/app/phpunit.xml.dist
............................................................... 63 / 500 ( 12%)
............................................................... 126 / 500 ( 25%)
............................................................... 189 / 500 ( 37%)
............................................................... 252 / 500 ( 50%)
............................................................... 315 / 500 ( 63%)
............................................................... 378 / 500 ( 75%)
............................................................... 441 / 500 ( 88%)
...........................................................
Time: 31 seconds, Memory: 289.50Mb
OK (500 tests, 500 assertions)
~/Sites/symfony/standard (2.0) $ phpunit -c app/
PHPUnit 3.6.10 by Sebastian Bergmann.
Configuration read from /Users/kriswallsmith/Sites/symfony/standard/app/phpunit.xml.dist
............................................................... 63 / 500 ( 12%)
............................................................... 126 / 500 ( 25%)
............................................................... 189 / 500 ( 37%)
............................................................... 252 / 500 ( 50%)
............................................................... 315 / 500 ( 63%)
............................................................... 378 / 500 ( 75%)
............................................................... 441 / 500 ( 88%)
...........................................................
Time: 40 seconds, Memory: 51.25Mb
OK (500 tests, 500 assertions)
@rajibahmed
Copy link

Why there is a decrease in memory usage with "asdf" enabled ?

@kriswallsmith
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment