diff options
author | msquare <msquare@notrademark.de> | 2019-11-30 15:37:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-30 15:37:48 +0100 |
commit | a18c7d13fcae0af77cdaef1947f2160cbf1dc56a (patch) | |
tree | 98633eb27bc514e51643766c0c4c45fc5cecfdd3 /tests/Unit/Renderer/TwigServiceProviderTest.php | |
parent | 14f8d208b817d8d7dccebdb5f7a6ada2bcb9d5f4 (diff) | |
parent | e80fb54522c307afec3d8bb474a47dd9d2d5da64 (diff) |
Merge pull request #682 from MyIgel/php7.4
PHP 7.4 compatibility, PHP min version 7.2, Twig 3
Diffstat (limited to 'tests/Unit/Renderer/TwigServiceProviderTest.php')
-rw-r--r-- | tests/Unit/Renderer/TwigServiceProviderTest.php | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/tests/Unit/Renderer/TwigServiceProviderTest.php b/tests/Unit/Renderer/TwigServiceProviderTest.php index cd071349..3336e015 100644 --- a/tests/Unit/Renderer/TwigServiceProviderTest.php +++ b/tests/Unit/Renderer/TwigServiceProviderTest.php @@ -11,10 +11,11 @@ use PHPUnit\Framework\MockObject\MockObject; use ReflectionClass as Reflection; use ReflectionException; use stdClass; -use Twig_Environment as Twig; -use Twig_Extension_Core as TwigCore; -use Twig_ExtensionInterface as ExtensionInterface; -use Twig_LoaderInterface as TwigLoaderInterface; +use Twig\Environment as Twig; +use Twig\Extension\AbstractExtension; +use Twig\Extension\CoreExtension as TwigCore; +use Twig\Extension\ExtensionInterface as ExtensionInterface; +use Twig\Loader\LoaderInterface as TwigLoaderInterface; class TwigServiceProviderTest extends ServiceProviderTest { @@ -103,9 +104,15 @@ class TwigServiceProviderTest extends ServiceProviderTest /** @var Config|MockObject $config */ $config = $this->createMock(Config::class); /** @var TwigCore|MockObject $twigCore */ - $twigCore = $this->getMockBuilder(stdClass::class) - ->addMethods(['setTimezone']) - ->getMock(); + $twigCore = $this->getMockForAbstractClass( + AbstractExtension::class, + [], + '', + true, + true, + true, + ['setTimezone'] + ); $app = $this->getApp(['make', 'instance', 'tag', 'get']); |