Skip to content

Instantly share code, notes, and snippets.

@jepster
Created December 18, 2014 17:45
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 jepster/56f58af299cdb1ba82df to your computer and use it in GitHub Desktop.
Save jepster/56f58af299cdb1ba82df to your computer and use it in GitHub Desktop.
Yii2 PHPUnit Test
<?php
use app\tests\fixtures\ModelFixtureDataCreator;
class MyTest extends PHPUnit_Framework_TestCase
{
protected function setUp()
{
require_once 'yii_booter_for_tests.php';
$test_classname = get_class($this);
ModelFixtureDataCreator::create($test_classname);
}
public function test()
{
MyController::export(1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment