client->call(Client::METHOD_POST, '/functions', array_merge([ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ 'name' => 'Test', 'vars' => [ 'funcKey1' => 'funcValue1', 'funcKey2' => 'funcValue2', 'funcKey3' => 'funcValue3', ], 'events' => [ 'account.create', 'account.delete', ], 'schedule' => '* * * * *', 'timeout' => 10, ]); $this->assertEquals(401, $response1['headers']['status-code']); return []; } }