22 lines
745 B
PHP
22 lines
745 B
PHP
<?php
|
|
|
|
namespace Tests\Unit\View;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class BasicDataNavigationTest extends TestCase
|
|
{
|
|
public function test_basic_data_is_an_empty_top_level_directory_before_invoice_management(): void
|
|
{
|
|
$navigation = require dirname(__DIR__, 3) . '/config/business_navigation.php';
|
|
$slugs = array_column($navigation, 'slug');
|
|
$index = array_search('basic-data', $slugs, true);
|
|
|
|
$this->assertNotFalse($index);
|
|
$this->assertSame('基础数据', $navigation[$index]['title']);
|
|
$this->assertSame([], $navigation[$index]['pages']);
|
|
$this->assertSame('invoice-management', $slugs[$index + 1]);
|
|
$this->assertCount(1, array_keys($slugs, 'basic-data', true));
|
|
}
|
|
}
|