@@ -35,7 +35,7 @@ function add_menu_page(string $page_title, string $menu_title, string $capabilit
3535 expect (method_exists ($ adminPage , 'addMenuPage ' ))->toBeTrue ();
3636});
3737
38- test ('AdminPage имеет 4 основные вкладки ' , function (): void {
38+ test ('AdminPage имеет 3 основные вкладки ' , function (): void {
3939 $ adminPage = new AdminPage ();
4040 $ reflection = new ReflectionClass ($ adminPage );
4141
@@ -45,11 +45,10 @@ function add_menu_page(string $page_title, string $menu_title, string $capabilit
4545 $ tabs = $ tabsProperty ->getValue ($ adminPage );
4646
4747 expect ($ tabs )->toBeArray ();
48- expect ($ tabs )->toHaveCount (4 );
48+ expect ($ tabs )->toHaveCount (3 );
4949 expect ($ tabs )->toHaveKey ('queues ' );
5050 expect ($ tabs )->toHaveKey ('scheduler ' );
51- expect ($ tabs )->toHaveKey ('diagnostics ' );
52- expect ($ tabs )->toHaveKey ('docs ' );
51+ expect ($ tabs )->toHaveKey ('system ' );
5352});
5453
5554test ('AdminPage имеет секции для каждой вкладки ' , function (): void {
@@ -63,8 +62,7 @@ function add_menu_page(string $page_title, string $menu_title, string $capabilit
6362 expect ($ sections )->toBeArray ();
6463 expect ($ sections )->toHaveKey ('queues ' );
6564 expect ($ sections )->toHaveKey ('scheduler ' );
66- expect ($ sections )->toHaveKey ('diagnostics ' );
67- expect ($ sections )->toHaveKey ('docs ' );
65+ expect ($ sections )->toHaveKey ('system ' );
6866});
6967
7068test ('Вкладка Очереди имеет 5 секций ' , function (): void {
@@ -80,54 +78,36 @@ function add_menu_page(string $page_title, string $menu_title, string $capabilit
8078 expect ($ sections ['queues ' ])->toHaveKey ('jobs ' );
8179 expect ($ sections ['queues ' ])->toHaveKey ('history ' );
8280 expect ($ sections ['queues ' ])->toHaveKey ('drivers ' );
83- expect ($ sections ['queues ' ])->toHaveKey ('settings ' );
81+ expect ($ sections ['queues ' ])->toHaveKey ('failed ' );
8482});
8583
86- test ('Вкладка Планировщик заданий имеет 5 секций ' , function (): void {
84+ test ('Вкладка Планировщик заданий имеет 4 секции ' , function (): void {
8785 $ adminPage = new AdminPage ();
8886 $ reflection = new ReflectionClass ($ adminPage );
8987
9088 $ sectionsProperty = $ reflection ->getProperty ('sections ' );
9189 $ sectionsProperty ->setAccessible (true );
9290 $ sections = $ sectionsProperty ->getValue ($ adminPage );
9391
94- expect ($ sections ['scheduler ' ])->toHaveCount (5 );
92+ expect ($ sections ['scheduler ' ])->toHaveCount (4 );
9593 expect ($ sections ['scheduler ' ])->toHaveKey ('overview ' );
9694 expect ($ sections ['scheduler ' ])->toHaveKey ('events ' );
9795 expect ($ sections ['scheduler ' ])->toHaveKey ('paused ' );
98- expect ($ sections ['scheduler ' ])->toHaveKey ('schedules ' );
99- expect ($ sections ['scheduler ' ])->toHaveKey ('settings ' );
96+ expect ($ sections ['scheduler ' ])->toHaveKey ('scheduled ' );
10097});
10198
102- test ('Вкладка Диагностика имеет 4 секции ' , function (): void {
99+ test ('Вкладка Система имеет 3 секции ' , function (): void {
103100 $ adminPage = new AdminPage ();
104101 $ reflection = new ReflectionClass ($ adminPage );
105102
106103 $ sectionsProperty = $ reflection ->getProperty ('sections ' );
107104 $ sectionsProperty ->setAccessible (true );
108105 $ sections = $ sectionsProperty ->getValue ($ adminPage );
109106
110- expect ($ sections ['diagnostics ' ])->toHaveCount (4 );
111- expect ($ sections ['diagnostics ' ])->toHaveKey ('health ' );
112- expect ($ sections ['diagnostics ' ])->toHaveKey ('environment ' );
113- expect ($ sections ['diagnostics ' ])->toHaveKey ('logs ' );
114- expect ($ sections ['diagnostics ' ])->toHaveKey ('tools ' );
115- });
116-
117- test ('Вкладка Документация имеет 5 секций ' , function (): void {
118- $ adminPage = new AdminPage ();
119- $ reflection = new ReflectionClass ($ adminPage );
120-
121- $ sectionsProperty = $ reflection ->getProperty ('sections ' );
122- $ sectionsProperty ->setAccessible (true );
123- $ sections = $ sectionsProperty ->getValue ($ adminPage );
124-
125- expect ($ sections ['docs ' ])->toHaveCount (5 );
126- expect ($ sections ['docs ' ])->toHaveKey ('intro ' );
127- expect ($ sections ['docs ' ])->toHaveKey ('quickstart ' );
128- expect ($ sections ['docs ' ])->toHaveKey ('api ' );
129- expect ($ sections ['docs ' ])->toHaveKey ('cli ' );
130- expect ($ sections ['docs ' ])->toHaveKey ('faq ' );
107+ expect ($ sections ['system ' ])->toHaveCount (3 );
108+ expect ($ sections ['system ' ])->toHaveKey ('status ' );
109+ expect ($ sections ['system ' ])->toHaveKey ('tools ' );
110+ expect ($ sections ['system ' ])->toHaveKey ('help ' );
131111});
132112
133113test ('AdminPage имеет метод renderPage ' , function (): void {
@@ -187,18 +167,6 @@ function add_menu_page(string $page_title, string $menu_title, string $capabilit
187167 expect (method_exists ($ adminPage , 'renderSchedulerEvents ' ))->toBeTrue ();
188168});
189169
190- test ('AdminPage рендерит методы для секций Диагностики ' , function (): void {
191- $ adminPage = new AdminPage ();
192-
193- expect (method_exists ($ adminPage , 'renderDiagnosticsEnvironment ' ))->toBeTrue ();
194- });
195-
196- test ('AdminPage рендерит методы для секций Документации ' , function (): void {
197- $ adminPage = new AdminPage ();
198-
199- expect (method_exists ($ adminPage , 'renderDocsIntro ' ))->toBeTrue ();
200- });
201-
202170test ('Метод getStatusLabel возвращает корректные метки ' , function (): void {
203171 $ adminPage = new AdminPage ();
204172 $ reflection = new ReflectionClass ($ adminPage );
0 commit comments