Skip to content

Commit a00703e

Browse files
committed
fix(deps): use site-default for testing instead of site-blank
1 parent caf27b3 commit a00703e

File tree

4 files changed

+33
-9
lines changed

4 files changed

+33
-9
lines changed

composer.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
},
1616
"require-dev": {
1717
"processwire/processwire": "dev-dev",
18+
"processwire/site-default": "1.0.0",
1819
"ryancramerdesign/fieldtypemapmarker": "1.0.0",
1920
"dadish/graphqlfieldtypemapmarker": "2.0.0",
2021
"phpunit/phpunit": "9.5.10"
@@ -24,6 +25,17 @@
2425
"type": "vcs",
2526
"url": "https://github.com/processwire/processwire"
2627
},
28+
{
29+
"type": "package",
30+
"package": {
31+
"name": "processwire/site-default",
32+
"version": "1.0.0",
33+
"dist": {
34+
"type": "zip",
35+
"url": "https://github.com/processwire/site-default/archive/master.zip"
36+
}
37+
}
38+
},
2739
{
2840
"type": "package",
2941
"package": {

composer.lock

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/bootstrap.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// paths
1010
$baseDir = realpath(__DIR__ . "/../");
1111
$pwDir = realpath($baseDir . "/vendor/processwire/processwire/");
12-
$siteDir = realpath($pwDir . "/site-blank/");
12+
$siteDir = realpath($baseDir . "/vendor/processwire/site-default/");
1313
$moduleDir = $siteDir . "/modules/ProcessGraphQL";
1414
$testFilesDir = realpath($baseDir . "/test/files");
1515
$siteFilesDir = $siteDir . "/assets/files";
@@ -23,7 +23,7 @@
2323
unlink($installFile);
2424
}
2525

26-
// overwrite site-blank's config.php with our own custom one
26+
// overwrite site-defaults's config.php with our own custom one
2727
copy(__DIR__ . "/site/config.php", $siteDir . "/config.php");
2828

2929
// symlink site/classes directory
@@ -62,16 +62,21 @@
6262
\symlink($mapMarkerGraphQLDir, $mapMarkerGraphQLDestDir);
6363
}
6464

65+
// symlink the site-default to vendor/processwire/processwire/site
66+
// so it is next to wire directory.
67+
$siteDirDest = $pwDir . "/site";
68+
if (!file_exists($siteDirDest)) {
69+
\symlink($siteDir, $siteDirDest);
70+
}
71+
6572
// symlink skyscrapers pages files to site's asset files
6673
if (!file_exists($siteFilesDir)) {
6774
\symlink($testFilesDir, $siteFilesDir);
6875
}
6976

7077
use ProcessWire\ProcessWire;
7178

72-
$config = ProcessWire::buildConfig($pwDir, null, [
73-
"siteDir" => "site-blank"
74-
]);
79+
$config = ProcessWire::buildConfig($pwDir);
7580

7681
require_once realpath(__DIR__ . "/databaseReset.php");
7782

test/cleanup.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99
use ProcessWire\ProcessWire;
1010

11-
$config = ProcessWire::buildConfig($pwDir, null, [
12-
"siteDir" => "site-default"
13-
]);
11+
$config = ProcessWire::buildConfig($pwDir);
1412

1513
require_once realpath(__DIR__ . "/databaseReset.php");
1614

0 commit comments

Comments
 (0)