Skip to content

Commit

Permalink
Merge branch '4.x' of https://github.com/craftcms/cms into 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Oct 22, 2024
2 parents c430a0e + 38c6b21 commit 2d0cbe7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/test/TestSetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ public static function configureCraft(): bool

$configPath = realpath(CRAFT_CONFIG_PATH);
$contentMigrationsPath = realpath(CRAFT_MIGRATIONS_PATH);
$rootPath = realpath(CRAFT_ROOT_PATH);
$storagePath = realpath(CRAFT_STORAGE_PATH);
$templatesPath = realpath(CRAFT_TEMPLATES_PATH);
$testsPath = realpath(CRAFT_TESTS_PATH);
Expand Down Expand Up @@ -350,6 +351,7 @@ public static function configureCraft(): bool
Craft::setAlias('@appicons', $srcPath . DIRECTORY_SEPARATOR . 'icons');
Craft::setAlias('@config', $configPath);
Craft::setAlias('@contentMigrations', $contentMigrationsPath);
Craft::setAlias('@root', $rootPath);
Craft::setAlias('@storage', $storagePath);
Craft::setAlias('@templates', $templatesPath);
Craft::setAlias('@tests', $testsPath);
Expand Down
2 changes: 2 additions & 0 deletions tests/_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
ini_set('date.timezone', 'UTC');
date_default_timezone_set('UTC');

define('CRAFT_ROOT_PATH', dirname(__DIR__));

// Use the current installation of Craft
const CRAFT_TESTS_PATH = __DIR__;
const CRAFT_STORAGE_PATH = __DIR__ . DIRECTORY_SEPARATOR . '_craft' . DIRECTORY_SEPARATOR . 'storage';
Expand Down
1 change: 0 additions & 1 deletion tests/unit/web/twig/ExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,6 @@ public function testCloneFunction(): void
*/
public function testDataUrlFunction(): void
{
Craft::setAlias('@root', dirname(__DIR__, 4));
$path = '@root/.github/workflows/ci.yml';
$dataUrl = $this->view->renderString('{{ dataUrl(path) }}', compact('path'));
self::assertStringStartsWith('data:application/x-yaml;base64,', $dataUrl);
Expand Down

0 comments on commit 2d0cbe7

Please sign in to comment.