/
var
/
www
/
html
/
plugin-techloyce
/
Modules
/
Webstores
/
Tests
/
Feature
/
Upload File
HOME
<?php namespace Modules\Webstores\Tests\Feature; use Tests\TestCase; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Foundation\Testing\RefreshDatabase; class WebstoreTest extends TestCase { /** * Testcase for accessing authorize endpoint without * defining integrationSource or integrationDestination * * @return void */ public function testWebstoreAuthorizationWithoutSourceDestination() { $response = $this->get('/webstores/authorize'); $response->assertStatus(500); } /** * Testcase for accessing authorize endpoint * with integrationSource and integrationDestination * * @return void */ public function testWebstoreAuthorizationWithSourceDestination() { $response = $this->get('/webstores/authorize?integrationSource=SubscriptionFlow&integrationDestination=Shopify'); $response->assertRedirect(); } /** * Testcase for accessing authorize endpoint with * non-existing integrationSource or integrationDestination * * @return void */ public function testWebstoreAuthorizationWithNonExistingSourceDestination() { $response = $this->get('/webstores/authorize?integrationSource=DummySource&integrationDestination=DummyDestination'); $response->assertStatus(500); } /** * Testcase for accessing authorize-callback endpoint * to check if session is missing given key. * * @return void */ public function testWebstoreAuthorizationCallbackSessionError() { $response = $this->get('/webstores/authorize-callback'); $response->assertSessionMissing('Webstores_PairingMeta')->assertStatus(500); } }