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
35 lines
939 B
PHP
35 lines
939 B
PHP
<?php
|
|
|
|
namespace Tests\Feature\Settings;
|
|
|
|
use App\Utilities\BusinessNavigation;
|
|
use Tests\Feature\FeatureTestCase;
|
|
|
|
class NavigationTest extends FeatureTestCase
|
|
{
|
|
public function testAdminCanUpdateSidebarLabels()
|
|
{
|
|
$this->loginAs()
|
|
->get(route('settings.navigation.manage'))
|
|
->assertOk()
|
|
->assertSeeText('侧边栏功能名称');
|
|
|
|
$this->patch(route('settings.navigation.save'), [
|
|
'section_titles' => [
|
|
'company-management' => '企业档案',
|
|
],
|
|
'page_titles' => [
|
|
'company-management' => [
|
|
'registration' => '企业设立',
|
|
],
|
|
],
|
|
])->assertOk();
|
|
|
|
$navigation = BusinessNavigation::all();
|
|
|
|
$this->assertSame('企业档案', $navigation[0]['title']);
|
|
$this->assertSame('企业设立', $navigation[0]['pages'][0]['title']);
|
|
}
|
|
|
|
}
|