SEO additions
This commit is contained in:
@@ -2,18 +2,20 @@
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
final class CheckoutPageTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
public function test_buy_page_contains_all_four_configured_paddle_prices(): void
|
||||
{
|
||||
config()->set('sonardesk.paddle.client_side_token', 'test_example');
|
||||
config()->set('sonardesk.paddle.environment', 'sandbox');
|
||||
config()->set('sonardesk.paddle.personal_monthly_price_id', 'pri_personal_monthly');
|
||||
config()->set('sonardesk.paddle.personal_annual_price_id', 'pri_personal_annual');
|
||||
config()->set('sonardesk.paddle.professional_monthly_price_id', 'pri_professional_monthly');
|
||||
config()->set('sonardesk.paddle.professional_annual_price_id', 'pri_professional_annual');
|
||||
config()->set('paddle.client_side_token', 'test_example');
|
||||
config()->set('paddle.environment', 'sandbox');
|
||||
config()->set('paddle.personal_monthly_price_id', 'pri_personal_monthly');
|
||||
config()->set('paddle.personal_annual_price_id', 'pri_personal_annual');
|
||||
config()->set('paddle.professional_monthly_price_id', 'pri_professional_monthly');
|
||||
config()->set('paddle.professional_annual_price_id', 'pri_professional_annual');
|
||||
|
||||
$this->get('/buy')
|
||||
->assertOk()
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Models\LicenseActivation;
|
||||
use App\Models\LicenseProduct;
|
||||
use App\Services\Licensing\LicenseIssuer;
|
||||
use Modules\Licensing\Models\LicenseActivation;
|
||||
use Modules\Licensing\Models\LicenseProduct;
|
||||
use Modules\Licensing\Services\LicenseIssuer;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Models\License;
|
||||
use App\Models\LicenseProduct;
|
||||
use Modules\Licensing\Models\License;
|
||||
use Modules\Licensing\Models\LicenseProduct;
|
||||
use App\Models\User;
|
||||
use App\Services\Payments\PurchaseProvisioner;
|
||||
use Modules\Paddle\Services\PurchaseProvisioner;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
@@ -84,7 +84,7 @@ class PaddleSubscriptionProvisioningTest extends TestCase
|
||||
$this->product('pri_personal_monthly', 'Personal', 1);
|
||||
app(PurchaseProvisioner::class)->provision('paddle', $this->subscription(
|
||||
'subscription.updated', 'active', 'pri_personal_monthly', 'pro_personal',
|
||||
['data' => ['scheduled_change' => ['action' => 'cancel', 'effective_at' => '2026-10-09T00:00:00Z']]]
|
||||
['scheduled_change' => ['action' => 'cancel', 'effective_at' => '2026-10-09T00:00:00Z']]
|
||||
));
|
||||
|
||||
$license = License::firstOrFail();
|
||||
@@ -97,7 +97,7 @@ class PaddleSubscriptionProvisioningTest extends TestCase
|
||||
$this->product('pri_personal_monthly', 'Personal', 1);
|
||||
$service = app(PurchaseProvisioner::class);
|
||||
$service->provision('paddle', $this->subscription('subscription.created', 'active', 'pri_personal_monthly', 'pro_personal'));
|
||||
$service->provision('paddle', $this->subscription('subscription.canceled', 'canceled', 'pri_personal_monthly', 'pro_personal', ['data' => ['current_billing_period' => null]]));
|
||||
$service->provision('paddle', $this->subscription('subscription.canceled', 'canceled', 'pri_personal_monthly', 'pro_personal', ['current_billing_period' => null]));
|
||||
|
||||
$license = License::firstOrFail();
|
||||
$this->assertNotNull($license->revoked_at);
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Models\License;
|
||||
use App\Models\LicenseProduct;
|
||||
use Modules\Licensing\Models\License;
|
||||
use Modules\Licensing\Models\LicenseProduct;
|
||||
use App\Models\User;
|
||||
use App\Services\Payments\PaddleClient;
|
||||
use Modules\Paddle\Services\PaddleClient;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Http\Middleware\PreventRequestForgery;
|
||||
use Mockery\MockInterface;
|
||||
use Tests\TestCase;
|
||||
|
||||
@@ -31,8 +32,10 @@ class PortalSubscriptionManagementTest extends TestCase
|
||||
|
||||
public function test_personal_subscription_is_upgraded_in_place(): void
|
||||
{
|
||||
config()->set('sonardesk.paddle.personal_monthly_price_id', 'pri_personal_monthly');
|
||||
config()->set('sonardesk.paddle.professional_monthly_price_id', 'pri_professional_monthly');
|
||||
$this->withoutMiddleware(PreventRequestForgery::class);
|
||||
|
||||
config()->set('paddle.personal_monthly_price_id', 'pri_personal_monthly');
|
||||
config()->set('paddle.professional_monthly_price_id', 'pri_professional_monthly');
|
||||
|
||||
$personal = $this->product('personal-monthly', 'Personal', 'pri_personal_monthly', 1);
|
||||
$professional = $this->product('professional-monthly', 'Professional', 'pri_professional_monthly', 3);
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Tests;
|
||||
|
||||
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
||||
|
||||
abstract class TestCase extends BaseTestCase
|
||||
{
|
||||
//
|
||||
}
|
||||
Reference in New Issue
Block a user