Skip to content

Commit

Permalink
get tests going again
Browse files Browse the repository at this point in the history
  • Loading branch information
edalzell committed Apr 18, 2023
1 parent 87f9144 commit 29f6948
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,15 @@ class ServiceProvider extends AddonServiceProvider
protected $fieldtypes = [
Tag::class,
];

public function bootAddon()
{
// needed for testing but not production
if (app()->environment('testing')) {
$this->loadViewsFrom(
__DIR__.'/../resources/views',
'uptime'
);
}
}
}
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function getEnvironmentSetUp($app)
$app->make(Manifest::class)->manifest = [
'transformstudios/uptime' => [
'id' => 'transformstudios/uptime',
'namespace' => 'TransformStudios\\Uptime\\',
'namespace' => 'TransformStudios\\Uptime',
],
];
}
Expand All @@ -57,7 +57,7 @@ protected function resolveApplicationConfiguration($app)
$configs = ['assets', 'cp', 'forms', 'routes', 'static_caching', 'sites', 'stache', 'system', 'users'];

foreach ($configs as $config) {
$app['config']->set("statamic.$config", require __DIR__ . "/../vendor/statamic/cms/config/{$config}.php");
$app['config']->set("statamic.$config", require __DIR__."/../vendor/statamic/cms/config/{$config}.php");
}

// Setting the user repository to the default flat file system
Expand Down

0 comments on commit 29f6948

Please sign in to comment.