Skip to content

Commit 7c3c3d9

Browse files
Merge pull request #14 from dmalusev/feat/pest-tests
Feat/pest tests
2 parents 05320c1 + 1af6a0d commit 7c3c3d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1996
-340
lines changed

README.old.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,17 +263,17 @@ Read more on [HMAC](https://en.wikipedia.org/wiki/HMAC)
263263

264264
namespace App\Service;
265265

266-
use BrosSquad\LaravelCrypto\Facades\Signing;
266+
use BrosSquad\LaravelCrypto\Facades\Sign;
267267

268268
class Service
269269
{
270270
public function createSignature()
271271
{
272272
$data = 'Hello World';
273273

274-
$signature = Signing::sign($data); // Base64 Encoded encoded signature
274+
$signature = Sign::sign($data); // Base64 Encoded encoded signature
275275

276-
$signature = Signing::signRaw($data); // Raw bytes for signature
276+
$signature = Sign::signRaw($data); // Raw bytes for signature
277277

278278
// Rest of the code
279279
}
@@ -282,7 +282,7 @@ class Service
282282
{
283283
$data = 'Hello World';
284284

285-
if(Signing::verify($data, $signature)) {
285+
if(Sign::verify($data, $signature)) {
286286
// Signature is valid
287287
} else {
288288
// Signature is invalid

composer.json

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,18 @@
2626
"require": {
2727
"php": ">=8.1",
2828
"ext-sodium": "*",
29-
"illuminate/support": "^8|^9|^10",
30-
"illuminate/contracts": "^8|^9|^10",
29+
"illuminate/collections": "^8|^9|^10",
3130
"illuminate/config": "^8|^9|^10",
32-
"illuminate/hashing": "^8|^9|^10",
31+
"illuminate/contracts": "^8|^9|^10",
3332
"illuminate/encryption": "^8|^9|^10",
34-
"illuminate/collections": "^8|^9|^10"
33+
"illuminate/hashing": "^8|^9|^10",
34+
"illuminate/support": "^8|^9|^10"
3535
},
3636
"require-dev": {
3737
"nunomaduro/collision": "^7.10",
38-
"orchestra/testbench": "^8.0|^9.0",
38+
"orchestra/testbench": "^8.21",
39+
"pestphp/pest": "^2.34",
40+
"pestphp/pest-plugin-laravel": "^2.3",
3941
"phpbench/phpbench": "@dev"
4042
},
4143
"autoload": {
@@ -58,7 +60,10 @@
5860
"ext-igbinary": "Required for Igbinary Serializer"
5961
},
6062
"config": {
61-
"sort-packages": true
63+
"sort-packages": true,
64+
"allow-plugins": {
65+
"pestphp/pest-plugin": true
66+
}
6267
},
6368
"extra": {
6469
"laravel": {
@@ -67,7 +72,7 @@
6772
],
6873
"aliases": {
6974
"Hashing": "BrosSquad\\LaravelCrypto\\Facades\\Hashing",
70-
"Signing": "BrosSquad\\LaravelCrypto\\Facades\\Signing"
75+
"Signing": "BrosSquad\\LaravelCrypto\\Facades\\Sign"
7176
}
7277
}
7378
},

0 commit comments

Comments
 (0)