Skip to content

Commit 5d0881d

Browse files
committed
add Shell fake
1 parent b493303 commit 5d0881d

File tree

1 file changed

+29
-0
lines changed
  • resources/views/docs/desktop/2/testing

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Shell
3+
order: 100
4+
---
5+
6+
# Fake Shell
7+
8+
## Example test case
9+
10+
```php
11+
use Native\Desktop\Facades\Shell;
12+
13+
#[\PHPUnit\Framework\Attributes\Test]
14+
public function example(): void
15+
{
16+
Shell::fake();
17+
18+
$this->get('/whatever-action');
19+
20+
Shell::assertOpenExternal('https://some-url.test');
21+
}
22+
```
23+
24+
## Available assertions
25+
26+
- `assertShowInFolder`
27+
- `assertOpenFile`
28+
- `assertTrashFile`
29+
- `assertOpenExternal`

0 commit comments

Comments
 (0)