PHPUnit细枝渲染方法的Sime测试
我写了一个小测试(非常简单),但它不起作用。我不知道为什么?以下是测试:PHPUnit细枝渲染方法的Sime测试,php,testing,twig,phpunit,symfony4,Php,Testing,Twig,Phpunit,Symfony4,我写了一个小测试(非常简单),但它不起作用。我不知道为什么?以下是测试: <?php namespace App\Tests\Mailer; use PHPUnit\Framework\TestCase; use Twig\Environment; class MailerTest extends TestCase { public function testConfirmationEmail() { $twigMock = $this->get
<?php
namespace App\Tests\Mailer;
use PHPUnit\Framework\TestCase;
use Twig\Environment;
class MailerTest extends TestCase
{
public function testConfirmationEmail()
{
$twigMock = $this->getMockBuilder(Environment::class)
->disableOriginalConstructor()
->getMock()
;
$twigMock->expects($this->once())->method('render');
}
}
您在哪里运行环境
类中的任何内容?