WuYongJie 2b6c4030e5
Some checks failed
Tests / PHP 8.1 (push) Has been cancelled
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
chore: 补充财务与支付模块源码
2026-07-20 18:40:05 +08:00

40 lines
1.1 KiB
PHP

<?php
namespace Modules\PaypalStandard\Tests\Feature;
use Tests\Feature\FeatureTestCase;
class SettingsTest extends FeatureTestCase
{
public function testItShouldSeePaypalStandardSettingsUpdatePage()
{
$this->loginAs()
->get(route('settings.module.edit', ['alias' => 'paypal-standard']))
->assertOk()
->assertSeeText(trans('paypal-standard::general.name'))
->assertSeeText(trans('paypal-standard::general.description'));
}
public function testItShouldUpdatePaypalStandardSettings()
{
$this->loginAs()
->patch(route('settings.module.edit', ['alias' => 'paypal-standard']), $this->getRequest())
->assertOk();
$this->assertFlashLevel('success');
}
public function getRequest()
{
return [
'name' => $this->faker->name,
'email' => $this->faker->safeEmail,
'mode' => 'sandbox',
'transaction' => 'sale',
'customer' => 1,
'debug' => 1,
'order' => 1,
];
}
}