-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com>
- Loading branch information
Showing
7 changed files
with
102 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,70 @@ | ||
{ | ||
"name": "igniterlabs/ti-ext-webhook", | ||
"type": "tastyigniter-package", | ||
"description": "Connect your third party apps via Zapier or other third-party services to your TastyIgniter website.", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Igniter Labs Team", | ||
"email": "hello@igniterlabs.co.uk" | ||
} | ||
], | ||
"require-dev": { | ||
"laravel/pint": "^1.2", | ||
"nunomaduro/larastan": "^2.4.0", | ||
"orchestra/testbench": "^8.5", | ||
"pestphp/pest-plugin-laravel": "^2.0", | ||
"tastyigniter/core": "dev-master", | ||
"tastyigniter/ti-ext-api": "v4.x-dev as 4.0", | ||
"tastyigniter/ti-ext-automation": "v4.x-dev as 4.0" | ||
"name": "igniterlabs/ti-ext-webhook", | ||
"type": "tastyigniter-package", | ||
"description": "Connect your third party apps via Zapier or other third-party services to your TastyIgniter website.", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Igniter Labs Team", | ||
"email": "hello@igniterlabs.co.uk" | ||
} | ||
], | ||
"repositories": [ | ||
{ | ||
"type": "path", | ||
"url": "../../../core/" | ||
} | ||
], | ||
"require-dev": { | ||
"laravel/pint": "^1.2", | ||
"nunomaduro/larastan": "^2.4.0", | ||
"sampoyigi/testbench": "dev-main as 1.0", | ||
"pestphp/pest-plugin-laravel": "^2.0", | ||
"tastyigniter/core": "*@dev", | ||
"tastyigniter/ti-ext-api": "v4.x-dev as 4.0", | ||
"tastyigniter/ti-ext-automation": "v4.x-dev as 4.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"IgniterLabs\\Webhook\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"IgniterLabs\\Webhook\\Tests\\": "tests/" | ||
} | ||
}, | ||
"extra": { | ||
"tastyigniter-extension": { | ||
"code": "igniterlabs.webhook", | ||
"name": "Webhooks", | ||
"icon": { | ||
"image": "icon.svg", | ||
"backgroundColor": "#147EFB", | ||
"color": "#FFF" | ||
}, | ||
"require": { | ||
"igniter.cart": "*", | ||
"igniter.local": "*", | ||
"igniter.user": "*", | ||
"igniter.reservation": "*" | ||
}, | ||
"homepage": "https://tastyigniter.com/marketplace/item/igniterlabs-webhook" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "vendor/bin/pest", | ||
"test-coverage": "vendor/bin/pest --coverage", | ||
"format": "vendor/bin/pint", | ||
"static": "vendor/bin/phpstan analyse --ansi --memory-limit 1056M" | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"pestphp/pest-plugin": true, | ||
"php-http/discovery": true, | ||
"composer/installers": true | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"IgniterLabs\\Webhook\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"IgniterLabs\\Webhook\\Tests\\": "tests/" | ||
} | ||
}, | ||
"extra": { | ||
"tastyigniter-extension": { | ||
"code": "igniterlabs.webhook", | ||
"name": "Webhooks", | ||
"icon": { | ||
"image": "icon.svg", | ||
"backgroundColor": "#147EFB", | ||
"color": "#FFF" | ||
}, | ||
"require": { | ||
"igniter.cart": "*", | ||
"igniter.local": "*", | ||
"igniter.user": "*", | ||
"igniter.reservation": "*" | ||
}, | ||
"homepage": "https://tastyigniter.com/marketplace/item/igniterlabs-webhook" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "vendor/bin/pest", | ||
"test-coverage": "vendor/bin/pest --coverage", | ||
"format": "vendor/bin/pint", | ||
"static": "vendor/bin/phpstan analyse --ansi --memory-limit 1056M" | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"pestphp/pest-plugin": true, | ||
"php-http/discovery": true, | ||
"composer/installers": true | ||
}, | ||
"sort-packages": true | ||
}, | ||
"minimum-stability": "dev" | ||
"sort-packages": true | ||
}, | ||
"minimum-stability": "dev" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
<?php | ||
|
||
uses(SamPoyigi\Testbench\TestCase::class)->in(__DIR__); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace IgniterLabs\Webhook\Tests\WebhookEvents; | ||
|
||
use IgniterLabs\Webhook\Classes\WebhookManager; | ||
use IgniterLabs\Webhook\Models\Outgoing; | ||
use IgniterLabs\Webhook\WebhookEvents\Category; | ||
use Illuminate\Support\Facades\Event; | ||
use Illuminate\Support\Facades\Queue; | ||
|
||
it('runs category webhook event', function ($action) { | ||
Queue::fake(); | ||
Event::fake(); | ||
|
||
Outgoing::create([ | ||
'name' => 'Category created', | ||
'url' => 'http://webhook.tld', | ||
'events' => ['category'], | ||
'is_active' => true, | ||
]); | ||
|
||
$actionCode = 'created'; | ||
$payload = Category::makePayloadFromEvent([], $actionCode); | ||
resolve(WebhookManager::class)->runWebhookEvent( | ||
'category', $actionCode, $payload ?? [] | ||
); | ||
|
||
Event::assertDispatched('igniterlabs.webhook.beforeDispatch'); | ||
})->with([ | ||
'created' | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.