diff --git a/composer.json b/composer.json index 5c295ec..75c9c4f 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "source": "https://github.com/cakephp/twig-view" }, "require": { - "cakephp/cakephp": "^5.0.0", + "cakephp/cakephp": "dev-5.next as 5.1.0", "jasny/twig-extensions": "^1.3", "twig/markdown-extra": "^3.0", "twig/twig": "^3.10.3" @@ -33,7 +33,7 @@ "cakephp/plugin-installer": "^1.3", "michelf/php-markdown": "^1.9", "mikey179/vfsstream": "^1.6.10", - "phpunit/phpunit": "^10.1.0" + "phpunit/phpunit": "^10.5.5 || ^11.1.3" }, "conflict": { "wyrihaximus/twig-view": "*" diff --git a/tests/TestCase/Twig/Extension/StringsExtensionTest.php b/tests/TestCase/Twig/Extension/StringsExtensionTest.php index c5ea73b..8cc0725 100644 --- a/tests/TestCase/Twig/Extension/StringsExtensionTest.php +++ b/tests/TestCase/Twig/Extension/StringsExtensionTest.php @@ -98,7 +98,7 @@ public function testFilterTail() $input = 'Bob is 65 years old.'; $callable = $this->getFilter('tail')->getCallable(); $result = call_user_func_array($callable, [$input, 7]); - $this->assertSame('...old.', $result); + $this->assertSame('…s old.', $result); } public function testFilterTruncate() @@ -106,7 +106,7 @@ public function testFilterTruncate() $input = 'Bob is 65 years old.'; $callable = $this->getFilter('truncate')->getCallable(); $result = call_user_func_array($callable, [$input, 7]); - $this->assertSame('Bob ...', $result); + $this->assertSame('Bob is…', $result); } public function testFilterExcerpt() @@ -114,7 +114,7 @@ public function testFilterExcerpt() $input = 'Bob is 65 years old.'; $callable = $this->getFilter('excerpt')->getCallable(); $result = call_user_func_array($callable, [$input, '65', 4]); - $this->assertSame('... is 65 yea...', $result); + $this->assertSame('… is 65 yea…', $result); } public function testFilterToList() diff --git a/tests/test_app/src/Application.php b/tests/test_app/src/Application.php index a19b32f..5642298 100644 --- a/tests/test_app/src/Application.php +++ b/tests/test_app/src/Application.php @@ -20,6 +20,7 @@ use Cake\Http\BaseApplication; use Cake\Http\MiddlewareQueue; +use Cake\TwigView\TwigViewPlugin; class Application extends BaseApplication { @@ -29,6 +30,8 @@ class Application extends BaseApplication public function bootstrap(): void { parent::bootstrap(); + + $this->addPlugin(TwigViewPlugin::class); } /**