DNA Service Test



    In the code above, the tests are using the RefreshDatabase class to reload the database. The IFrameTest class is using the WithFaker class to create a fake response.

    Library: laravel

    namespace Tests\Feature\Store;
    use Database\Seeders\PermissionSeeder;
    use Illuminate\Foundation\Testing\RefreshDatabase;
    use Illuminate\Foundation\Testing\WithFaker;
    use Illuminate\Support\Facades\URL;
    use Tests\TestCase;
    class IFrameTest extends TestCase
      use RefreshDatabase;
      use WithFaker;
      protected function setUp(): void
      public function test_user_can_view_dna_service_iframe_if_product_category_is_DNA()
        $purchaseConfirmedRoute = URL::signedRoute('basket.checkout', ['purchaseConfirmed' => true]);
        $response = $this->get(route('iframe.dna', ['purchaseConfirmedRoute' => $purchaseConfirmedRoute]));
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.