<?php

namespace Modules\PrintSuppliers\Tests\Unit;

use Modules\PrintSuppliers\Models\TemplateGelato;
use Modules\PrintSuppliers\Tests\TestCase;
use Modules\PrintSuppliers\Controllers\GelatoController;

class GelatoGetTemplateTest extends TestCase
{
    /**
     * A basic test example.
     * @test
     * @dataProvider provideTrimData
     * @return void
     */
    public function testSearchGelatoProduct($expectedResult, $input)
    {
        $gelatoController = new GelatoController();

        $productUid = $gelatoController->searchGelatoProduct($input);

        $this->assertEquals($expectedResult, $productUid);
    }

    public function provideTrimData()
    {
        return [
            [
                "apparel_product_gca_t-shirt_gsc_crewneck_gcu_unisex_gqa_heavy-weight_gsi_xl_gco_black_gpr_4-0",
                [7, 'Black', 'XL', 'Men', 'Heavyweight T-shirt']
            ],
        ];
    }
}
