Domain\Student\Http\StudentControllerTest::test_update_by_put PHP Method

test_update_by_put() public method

public test_update_by_put ( )
    public function test_update_by_put()
    {
        $student = factory(Student::class)->create();
        $user = factory(User::class)->create(['owner_id' => $student->id, 'owner_type' => get_class($student)]);
        $data = ['name' => 'Aluno x', 'responsible' => 'Responsável', 'phone_responsible' => '4199999999', 'sex' => $student->sex, 'postcode' => '12345678', 'street' => 'Rua x', 'number' => '1', 'district' => 'Bairro', 'city' => 'Cidade', 'state' => 'PR', 'phone' => '4133333333', 'cellphone' => '4199999999', 'monthly_payment' => 10, 'day_of_payment' => 15, 'installments' => 5, 'status' => true, 'user' => ['username' => $student->user->username, 'email' => $student->user->email]];
        $this->put('api/v1/student/' . $student->id, $data);
        $this->seeStatusCode(200);
        $this->seeJson(['name' => 'Aluno x']);
        $this->assertInstanceOf(Student::class, $this->response->original);
        $this->seeInDatabase('students', ['id' => $this->response->original->id]);
    }