TIF_E41200988/Pengukuran Kinerja Dosen/tests/Feature/Hasilakhir.php

29 lines
681 B
PHP

<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
use App\Models\PerhitunganModel;
class Hasilakhir extends TestCase
{
/**
* A basic feature test example.
*/
//
public function testFinalResult(): void
{
$hasil = PerhitunganModel::get_hasil();
dd($hasil);
$this->assertNotEmpty($hasil);
$this->assertCount(4, $hasil);
$this->assertEquals(2, $hasil[0]->id_alternatif);
$this->assertEquals(3, $hasil[1]->id_alternatif);
$this->assertEquals(4, $hasil[2]->id_alternatif);
$this->assertEquals(5, $hasil[3]->id_alternatif);
}
}