diff options
author | Arnold Daniels <arnold@jasny.net> | 2017-06-05 21:31:48 +0200 |
---|---|---|
committer | Arnold Daniels <arnold@jasny.net> | 2017-06-05 21:31:48 +0200 |
commit | daa6dbc9e5831d02b1bf5e24db022a7522454075 (patch) | |
tree | 468887f4dda4c36d04bf9ee693b56c2d81cfed35 | |
parent | 0ed94f36abb86990b7f4bfaef0af79d68e6762c3 (diff) | |
download | view-origin/master.zip view-origin/master.tar.gz view-origin/master.tar.bz2 |
Fixed TwigAssetic plugin testHEADv1.1.0origin/masterorigin/HEADmaster
-rw-r--r-- | tests/View/Plugin/TwigAsseticTest.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/View/Plugin/TwigAsseticTest.php b/tests/View/Plugin/TwigAsseticTest.php index 8d1745d..a8074de 100644 --- a/tests/View/Plugin/TwigAsseticTest.php +++ b/tests/View/Plugin/TwigAsseticTest.php @@ -87,8 +87,7 @@ class TwigAsseticTest extends TestCase $resource2 = $this->createMock(TwigResource::class); $tmpl = $this->createMock(Twig_Template::class); - $tmplParent1 = $this->createMock(Twig_Template::class); - $tmplParent2 = $this->createMock(Twig_Template::class); + $tmplParent = $this->createMock(Twig_Template::class); $this->plugin->expects($this->once())->method('createFormulaLoader') ->with($this->identicalTo($this->twig)) @@ -114,11 +113,11 @@ class TwigAsseticTest extends TestCase $this->writer->expects($this->once())->method('writeManagerAssets')->with($this->identicalTo($manager)); $this->twig->expects($this->once())->method('loadTemplate')->with('foo.html.twig')->willReturn($tmpl); - $tmpl->expects($this->once())->method('getParent')->with([])->willReturn($tmplParent1); - $tmplParent1->expects($this->once())->method('getParent')->with([])->willReturn($tmplParent2); + $tmpl->expects($this->once())->method('getParent')->with([])->willReturn($tmplParent); + $tmpl->expects($this->once())->method('__toString')->willReturn('foo.html.twig'); - $tmplParent1->expects($this->once())->method('__toString')->willReturn('foo.html.twig'); - $tmplParent2->expects($this->once())->method('__toString')->willReturn('base.html.twig'); + $tmplParent->expects($this->once())->method('getParent')->with([])->willReturn(null); + $tmplParent->expects($this->once())->method('__toString')->willReturn('base.html.twig'); $this->plugin->onRender($this->view, 'foo.html.twig', []); } |