Skip to content

Commit

Permalink
add phpunit 11 support
Browse files Browse the repository at this point in the history
  • Loading branch information
LordSimal committed Aug 10, 2024
1 parent 2bda8f7 commit fa91cde
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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": "*"
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase/Twig/Extension/StringsExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,23 @@ 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()
{
$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()
{
$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()
Expand Down
3 changes: 3 additions & 0 deletions tests/test_app/src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

use Cake\Http\BaseApplication;
use Cake\Http\MiddlewareQueue;
use Cake\TwigView\TwigViewPlugin;

class Application extends BaseApplication
{
Expand All @@ -29,6 +30,8 @@ class Application extends BaseApplication
public function bootstrap(): void
{
parent::bootstrap();

$this->addPlugin(TwigViewPlugin::class);
}

/**
Expand Down

0 comments on commit fa91cde

Please sign in to comment.