Skip to content

Instantly share code, notes, and snippets.

@mnapoli
Created February 3, 2015 09:23
Show Gist options
  • Save mnapoli/5e1361846ff1e93f8a96 to your computer and use it in GitHub Desktop.
Save mnapoli/5e1361846ff1e93f8a96 to your computer and use it in GitHub Desktop.
PHPUnit + PHP-DI
<?php
use ...;
class GeneratingArgumentsTest extends \PHPUnit_Framework_TestCase
{
/**
* @var VariableArgumentCollectionFactory
* @Inject
*/
private $variableArgumentCollectionFactory;
/**
* @var InlineArgumentCollectionPrinter
* @Inject
*/
private $inlineArgumentCollectionPrinter;
protected function setUp()
{
$container = ContainerBuilder::buildDevContainer();
$container->injectOn($this);
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment