<commit_before><?php

namespace Tests\Unit;

use Tests\TestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;

use App\Collections\Gallery;

class GalleryTest extends ApiTestCase
{

    /** @test */
    public function it_fetches_all_galleries()
    {

        $this->it_fetches_all(Gallery::class, 'galleries');
        
    }

    /** @test */
    public function it_fetches_a_single_gallery()
    {

        $this->it_fetches_a_single(Gallery::class, 'galleries');

    }

    /** @test */
    public function it_fetches_multiple_galleries()
    {

        $this->it_fetches_multiple(Gallery::class, 'galleries');

    }


    /** @test */
    public function it_400s_if_nonnumerid_nonuuid_is_passed()
    {

        $this->it_400s(Gallery::class, 'galleries');
        
    }

    /** @test */
    public function it_403s_if_limit_is_too_high()
    {

        $this->it_403s(Gallery::class, 'galleries');

    }

    /** @test */
    public function it_404s_if_not_found()
    {

        $this->it_404s(Gallery::class, 'galleries');

    }

    /** @test */
    public function it_405s_if_a_request_is_posted()
    {

        $this->it_405s(Gallery::class, 'galleries');
        
    }


    /** @test */
    public function it_fetches_location_types_for_a_gallery()
    {

        $this->attach(LocationType::class, 4)->make(Gallery::class);

        $response = $this->getJson('api/v1/galleries/' .$this->ids[0] .'/location-types');
        $response->assertSuccessful();

        $types = $response->json()['data'];
        $this->assertCount(4, $types);
        
        foreach ($types as $type)
        {
            $this->assertArrayHasKeys($type, ['id', 'title']);
        }
    }
<commit_msg>Remove deprecated Gallery unit test<commit_after><?php

namespace Tests\Unit;

use Tests\TestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;

use App\Collections\Gallery;

class GalleryTest extends ApiTestCase
{

    /** @test */
    public function it_fetches_all_galleries()
    {

        $this->it_fetches_all(Gallery::class, 'galleries');
        
    }

    /** @test */
    public function it_fetches_a_single_gallery()
    {

        $this->it_fetches_a_single(Gallery::class, 'galleries');

    }

    /** @test */
    public function it_fetches_multiple_galleries()
    {

        $this->it_fetches_multiple(Gallery::class, 'galleries');

    }


    /** @test */
    public function it_400s_if_nonnumerid_nonuuid_is_passed()
    {

        $this->it_400s(Gallery::class, 'galleries');
        
    }

    /** @test */
    public function it_403s_if_limit_is_too_high()
    {

        $this->it_403s(Gallery::class, 'galleries');

    }

    /** @test */
    public function it_404s_if_not_found()
    {

        $this->it_404s(Gallery::class, 'galleries');

    }

    /** @test */
    public function it_405s_if_a_request_is_posted()
    {

        $this->it_405s(Gallery::class, 'galleries');
        
    }

{'fraction_non_alphanumeric': 0.1411764705882353, 'fraction_numerical': 0.01699346405228758, 'mean_word_length': 2.6968599033816427, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3798958', 'n_tokens_mistral': 1113, 'n_tokens_neox': 1007, 'n_words': 140}