Domain\Classroom\Http\ClassroomControllerTest::test_store_by_post PHP Метод

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

public test_store_by_post ( )
    public function test_store_by_post()
    {
        $classroom = ['name' => 'Classroom x', 'teacher_id' => factory(Teacher::class)->create()->id, 'schedule_id' => factory(Schedule::class)->create()->id];
        $this->post('api/v1/classroom/', $classroom);
        $this->seeStatusCode(200);
        $this->seeJson(['name' => 'Classroom x']);
        $this->assertInstanceOf(Classroom::class, $this->response->original);
        $this->seeInDatabase('classrooms', ['id' => $this->response->original->id]);
    }