Domain\Classroom\ClassroomMatterTest::test_create_classroom_matter_with_student_completed PHP Méthode

test_create_classroom_matter_with_student_completed() public méthode

    public function test_create_classroom_matter_with_student_completed()
    {
        $classroomMatter = factory(ClassroomMatter::class)->create();
        $student = factory(Student::class)->create();
        $classroomMatter->studentCompletds()->attach($student);
        $this->assertInstanceOf(Student::class, $classroomMatter->studentCompletds()->first());
        $this->seeInDatabase('classroom_matter_student_completed', ['classroom_matter_id' => $classroomMatter->id, 'student_id' => $student->id]);
    }