Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tests For System #101

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Facades/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
use Illuminate\Support\Facades\Facade;

/**
* @method static bool canPromptTouchID()
* @method static mixed canPromptTouchID()
* @method static bool promptTouchID(string $reason)
* @method static array printers()
* @method static void print(string $html, ?\Native\Laravel\DataObjects\Printer $printer = null)
* @method static string printToPDF(string $html)
*/
class System extends Facade
{
Expand Down
2 changes: 1 addition & 1 deletion src/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function __construct(protected Client $client)
{
}

public function canPromptTouchID(): bool
public function canPromptTouchID(): mixed
{
return $this->client->get('system/can-prompt-touch-id')->json('result');
}
Expand Down
10 changes: 10 additions & 0 deletions tests/System/SystemTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

test('test system', function () {
$system = \Native\Laravel\Facades\System::printers();

expect($system)
->toBeArray()
->and($system)
->toBeEmpty();
});
Loading