File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use Native \Laravel \Facades \MenuBar ;
4
+ use Native \Laravel \Menu \Menu ;
5
+
6
+ it ('menubar with create ' , function () {
7
+ config ()->set ('nativephp-internal.api_url ' , 'https://jsonplaceholder.typicode.com/todos/1 ' );
8
+
9
+ $ menuBar = MenuBar::create ()
10
+ ->showDockIcon ()
11
+ ->alwaysOnTop ()
12
+ ->label ('milwad ' )
13
+ ->icon ('nativephp.png ' )
14
+ ->url ('https://github.com/milwad-dev ' )
15
+ ->withContextMenu (
16
+ Menu::new ()->label ('My Application ' )->quit (),
17
+ );
18
+ $ menuBarArray = $ menuBar ->toArray ();
19
+
20
+ $ this ->assertTrue ($ menuBarArray ['showDockIcon ' ]);
21
+ $ this ->assertTrue ($ menuBarArray ['alwaysOnTop ' ]);
22
+ $ this ->assertEquals ('milwad ' , $ menuBarArray ['label ' ]);
23
+ $ this ->assertEquals ('https://github.com/milwad-dev ' , $ menuBarArray ['url ' ]);
24
+ $ this ->assertEquals ('nativephp.png ' , $ menuBarArray ['icon ' ]);
25
+ $ this ->assertIsArray ($ menuBarArray ['contextMenu ' ]);
26
+ });
You can’t perform that action at this time.
0 commit comments