Domain\Student\StudentRepositoryTest::test_get_billets PHP Метод

test_get_billets() публичный Метод

public test_get_billets ( )
    public function test_get_billets()
    {
        $student = factory(Student::class)->create();
        $billets = factory(Billet::class, 5)->create(['student_id' => $student->id]);
        $repo = App::make(StudentRepository::class);
        $student = $repo->getBillets($student->id);
        $this->assertInstanceOf(Student::class, $student);
        $this->assertInstanceOf(Billet::class, $student->billets->first());
        foreach ($billets as $billet) {
            $this->seeInDatabase('billets', ['id' => $billet->id, 'student_id' => $student->id]);
        }
    }