[TESTS] Fix Twig/ExtensionTest

This commit is contained in:
Diogo Peralta Cordeiro 2022-03-08 01:54:05 +00:00
parent 0441f030ab
commit d857baa0f1
No known key found for this signature in database
GPG Key ID: 18D2D35001FBFAB0

View File

@ -35,7 +35,6 @@ declare(strict_types = 1);
namespace App\Tests\Twig; namespace App\Tests\Twig;
use App\Core\DB\DB;
use App\Twig\Extension; use App\Twig\Extension;
use App\Twig\Runtime; use App\Twig\Runtime;
use App\Util\GNUsocialTestCase; use App\Util\GNUsocialTestCase;
@ -100,14 +99,4 @@ class ExtensionTest extends GNUsocialTestCase
static::assertSame('active', $runtime->isCurrentRouteActive('current_route')); static::assertSame('active', $runtime->isCurrentRouteActive('current_route'));
static::assertSame('', $runtime->isCurrentRouteActive('some_route', 'some_other_route')); static::assertSame('', $runtime->isCurrentRouteActive('some_route', 'some_other_route'));
} }
public function testGetNoteActions()
{
static::bootKernel();
$req = $this->createMock(Request::class);
$runtime = new Runtime;
$runtime->setRequest($req);
static::assertSame([], $runtime->getNoteActions(DB::dql('select n from note n where n.content = \'some content\'')[0]));
}
} }