TRF Certest first commit

This commit is contained in:
2025-02-26 08:57:46 +01:00
commit 3ce064a108
2524 changed files with 475404 additions and 0 deletions
@@ -0,0 +1,35 @@
<?php
namespace Tests\Unit\Repositories\Country;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
use Vanguard\Country;
use Vanguard\Repositories\Country\EloquentCountry;
class EloquentCountryTest extends TestCase
{
use RefreshDatabase;
/**
* @var EloquentCountry
*/
protected $repo;
protected function setUp(): void
{
parent::setUp();
$this->repo = app(EloquentCountry::class);
}
/** @test */
public function lists()
{
$countries = Country::factory()->times(8)->create();
$countries = $countries->sortBy(function ($country) {
return $country->name;
})->pluck('name', 'id');
$this->assertEquals($countries->toArray(), $this->repo->lists()->toArray());
}
}