Skip to content

Instantly share code, notes, and snippets.

@ancillaryfactory
Last active August 29, 2015 14:27
Show Gist options
  • Save ancillaryfactory/92688fe15afd75da72dd to your computer and use it in GitHub Desktop.
Save ancillaryfactory/92688fe15afd75da72dd to your computer and use it in GitHub Desktop.
Symfony PHPUnit Test Starter
<snippet>
<content><![CDATA[
<?php
namespace AppBundle\Tests\\$1;
use AppBundle\\$1\\$2;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class $2Test extends WebTestCase
{
private \$container;
private \$client;
private \$em;
public function __construct()
{
\$this->client = static::createClient();
\$this->container = $this->client->getContainer();
\$this->em = $this->container->get('doctrine.orm.entity_manager');
}
public function testSomething()
{
$0
}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>phptest</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<description>Symfony PHPUnit Test</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment