- Add PageviewData readonly DTO class for type safety - Update AnalyticsClient to accept PageviewData instead of array - Move analytics sending to terminate() method (runs after response sent) - Update all tests for new DTO pattern
28 lines
573 B
PHP
28 lines
573 B
PHP
<?php
|
|
|
|
namespace Mattitja\Analytics\Tests;
|
|
|
|
use Mattitja\Analytics\AnalyticsServiceProvider;
|
|
use Orchestra\Testbench\TestCase as Orchestra;
|
|
|
|
class TestCase extends Orchestra
|
|
{
|
|
protected function setUp(): void
|
|
{
|
|
parent::setUp();
|
|
}
|
|
|
|
protected function getPackageProviders($app)
|
|
{
|
|
return [
|
|
AnalyticsServiceProvider::class,
|
|
];
|
|
}
|
|
|
|
public function getEnvironmentSetUp($app)
|
|
{
|
|
config()->set('mattitja-analytics.site_key', 'testsiteky');
|
|
config()->set('mattitja-analytics.enabled', true);
|
|
}
|
|
}
|