"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Tests/Extension/StopwatchExtensionTest.php" between
phplist-3.4.5.tgz and phplist-3.4.6.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

StopwatchExtensionTest.php  (phplist-3.4.5.tgz):StopwatchExtensionTest.php  (phplist-3.4.6.tgz)
skipping to change at line 22 skipping to change at line 22
namespace Symfony\Bridge\Twig\Tests\Extension; namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\StopwatchExtension; use Symfony\Bridge\Twig\Extension\StopwatchExtension;
use Twig\Environment; use Twig\Environment;
use Twig\Error\RuntimeError; use Twig\Error\RuntimeError;
use Twig\Loader\ArrayLoader; use Twig\Loader\ArrayLoader;
class StopwatchExtensionTest extends TestCase class StopwatchExtensionTest extends TestCase
{ {
/**
* @expectedException \Twig\Error\SyntaxError
*/
public function testFailIfStoppingWrongEvent() public function testFailIfStoppingWrongEvent()
{ {
$this->expectException('Twig\Error\SyntaxError');
$this->testTiming('{% stopwatch "foo" %}{% endstopwatch "bar" %}', []); $this->testTiming('{% stopwatch "foo" %}{% endstopwatch "bar" %}', []);
} }
/** /**
* @dataProvider getTimingTemplates * @dataProvider getTimingTemplates
*/ */
public function testTiming($template, $events) public function testTiming($template, $events)
{ {
$twig = new Environment(new ArrayLoader(['template' => $template]), ['de bug' => true, 'cache' => false, 'autoescape' => 'html', 'optimizations' => 0]); $twig = new Environment(new ArrayLoader(['template' => $template]), ['de bug' => true, 'cache' => false, 'autoescape' => 'html', 'optimizations' => 0]);
$twig->addExtension(new StopwatchExtension($this->getStopwatch($events)) ); $twig->addExtension(new StopwatchExtension($this->getStopwatch($events)) );
 End of changes. 2 change blocks. 
3 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)