コード例 #1
0
 /**
  * @covers ::getGlobals
  * @expectedException Twig_Error_Runtime
  */
 public function testDisabledTwigStrict()
 {
     $kernel = new AppKernel('FakerGeneratorExtensionTest_testDisabledTwigStrict', true);
     $kernel->boot();
     $twig = $kernel->getContainer()->get('twig');
     $twig->render('@FakerBundle/Tests/Resources/views/faker.html.twig');
 }
コード例 #2
0
 /**
  * @covers ::load
  */
 public function testSeedParameter()
 {
     $kernel = new AppKernel('FakerExtensionTest_testSeedParameter', true);
     $kernel->boot();
     $faker = $kernel->getContainer()->get('faker');
     $this->assertSame('Miss Lorna Dibbert', $faker->name);
     $this->assertSame('Litzy Emard', $faker->name);
 }