Domain\Student\StudentRepositoryTest::test_get_with_classrooms PHP Method

test_get_with_classrooms() public method

    public function test_get_with_classrooms()
    {
        $student = factory(Student::class)->create();
        factory(Classroom::class, 10)->create()->each(function ($c) use($student) {
            $student->classrooms()->attach($c);
        });
        $repo = App::make(StudentRepository::class);
        $classrooms = $repo->getWithClassrooms($student->id);
        foreach ($classrooms as $classroom) {
            $this->assertInstanceOf(Classroom::class, $classroom);
        }
    }