Skip to content

Commit 4a1b1cc

Browse files
committed
Don't assume people using this package arent running tests
Also we should be YAML::dumping, not json_encoding
1 parent 6d75920 commit 4a1b1cc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

phpunit.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
<env name="MAIL_DRIVER" value="array"/>
1414
<env name="DB_CONNECTION" value="sqlite"/>
1515
<env name="DB_DATABASE" value=":memory:"/>
16+
<env name="EYRIS_TEST_SUITE" value="true" />
1617
</php>
1718
</phpunit>

src/Managers/Agent.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Agent
2424

2525
public function __construct()
2626
{
27-
$this->supportsAddonSettings = app()->environment('testing') ? true : substr(Statamic::version(), 0, 1) >= 6;
27+
$this->supportsAddonSettings = env('EYRIS_TEST_SUITE') ? true : substr(Statamic::version(), 0, 1) >= 6;
2828
}
2929

3030
private function client()
@@ -78,7 +78,8 @@ public function saveSettings(Collection $settings): void
7878
}
7979

8080
File::ensureDirectoryExists(resource_path('addons'));
81-
File::put(resource_path('addons/statamic-eyris.yaml'), json_encode($settings->all()));
81+
82+
File::put(resource_path('addons/statamic-eyris.yaml'), YAML::dump($settings->all()));
8283
}
8384

8485
public function settings(): Collection

0 commit comments

Comments
 (0)