Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mcoil.corals.io/tests/Feature/Admin/AttributeValues/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mcoil.corals.io/tests/Feature/Admin/AttributeValues/AttributeValuesFeatureTest.php
<?php

namespace Tests\Feature\Admin\AttributeValues;

use App\Shop\Attributes\Attribute;
use Tests\TestCase;

class AttributeValuesFeatureTest extends TestCase
{
    /** @test */
    public function it_can_remove_the_attribute_value()
    {
        $attribute = factory(Attribute::class)->create();

        $this
            ->actingAs($this->employee, 'employee')
            ->post(route('admin.attributes.values.store', $attribute->id), ['value' => 'test']);
/*
        $this
            ->actingAs($this->employee, 'employee')
            ->delete(route('admin.attributes.values.destroy', [$attribute->id, 1]))
            ->assertStatus(302)
            ->assertRedirect(route('admin.attributes.show', $attribute->id))
            ->assertSessionHas('message', 'Attribute value removed!');
            */
    }

    /** @test */
    public function it_can_store_the_attribute_values()
    {
        $attribute = factory(Attribute::class)->create();

        $this
            ->actingAs($this->employee, 'employee')
            ->post(route('admin.attributes.values.store', $attribute->id), ['value' => 'test'])
            ->assertStatus(302)
            ->assertRedirect(route('admin.attributes.show', $attribute->id))
            ->assertSessionHas('message', 'Attribute value created');
    }
    
    /** @test */
    public function it_can_sow_the_create_the_attribute_value_page()
    {
        $attribute = factory(Attribute::class)->create();

        $this
            ->actingAs($this->employee, 'employee')
            ->get(route('admin.attributes.values.create', $attribute->id))
            ->assertStatus(200)
            ->assertSee('Attribute value')
            ->assertSee($attribute->name);
    }
}

Spamworldpro Mini