Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bc7e7bb

Browse filesBrowse files
minor symfony#31941 [TwigBundle] fix tests (nicolas-grekas)
This PR was merged into the 4.3 branch. Discussion ---------- [TwigBundle] fix tests | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Should make master back to green. Commits ------- 5b29918 [TwigBundle] fix tests
2 parents e718458 + 5b29918 commit bc7e7bb
Copy full SHA for bc7e7bb

File tree

Expand file treeCollapse file tree

1 file changed

+6
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-3
lines changed

‎src/Symfony/Bundle/TwigBundle/Tests/Loader/FilesystemLoaderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/Tests/Loader/FilesystemLoaderTest.php
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@
1111

1212
namespace Symfony\Bundle\TwigBundle\Tests\Loader;
1313

14-
use Symfony\Bundle\FrameworkBundle\Templating\TemplateReference;
1514
use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader;
1615
use Symfony\Bundle\TwigBundle\Tests\TestCase;
16+
use Symfony\Component\Templating\TemplateReferenceInterface;
1717

18+
/**
19+
* @group legacy
20+
*/
1821
class FilesystemLoaderTest extends TestCase
1922
{
2023
public function testGetSourceContext()
@@ -61,7 +64,7 @@ public function testTwigErrorIfLocatorThrowsInvalid()
6164
->expects($this->once())
6265
->method('parse')
6366
->with('name.format.engine')
64-
->willReturn(new TemplateReference('', '', 'name', 'format', 'engine'))
67+
->willReturn($this->getMockBuilder(TemplateReferenceInterface::class)->getMock())
6568
;
6669

6770
$locator = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock();
@@ -85,7 +88,7 @@ public function testTwigErrorIfLocatorReturnsFalse()
8588
->expects($this->once())
8689
->method('parse')
8790
->with('name.format.engine')
88-
->willReturn(new TemplateReference('', '', 'name', 'format', 'engine'))
91+
->willReturn($this->getMockBuilder(TemplateReferenceInterface::class)->getMock())
8992
;
9093

9194
$locator = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.