mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-28 06:34:14 +01:00
* merging 3.0 into develop * N°5102 - Allow to send emails (eg. notifications) using GSuite SMTP and OAuth * migration to iTop 3.1 Co-authored-by: Eric Espie <eric.espie@combodo.com>
35 lines
759 B
PHP
35 lines
759 B
PHP
<?php
|
|
namespace Combodo\iTop\Test\UnitTest;
|
|
|
|
use AppBundle\Twig\AppExtension;
|
|
use Combodo\iTop\Application\TwigBase\Twig\TwigHelper;
|
|
use Combodo\iTop\Test\UnitTest\ItopTestCase;
|
|
|
|
class TwigTest extends ItopTestCase
|
|
{
|
|
|
|
/**
|
|
* Test the fix for ticket N°4384
|
|
*
|
|
* @dataProvider testTemplateProvider
|
|
*
|
|
*/
|
|
public function testTemplate($sFileName, $expected)
|
|
{
|
|
$oTwig = TwigHelper::GetTwigEnvironment( dirname(__FILE__));
|
|
|
|
$sHtml = $oTwig->render($sFileName.'.twig');
|
|
$this->assertSame($sHtml, $expected);
|
|
}
|
|
|
|
public static function testTemplateProvider()
|
|
{
|
|
$aReturn = array();
|
|
$aReturn['filter_system'] = [
|
|
'sFileName' => 'test.html',
|
|
'expected' =>file_get_contents(dirname(__FILE__).'/test.html'),
|
|
];
|
|
|
|
return $aReturn;
|
|
}
|
|
} |