Giter Club home page Giter Club logo

jsonapi-behat-extension's People

Contributors

abgeo avatar ademarco avatar bircher avatar damian-nz avatar greg0ire avatar kielabokkie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jsonapi-behat-extension's Issues

Multiple client credentials

I need to be able to specify at run time which client credentials I would like to OAuth with.

Use case:
I have more than one OAuth grant and have different test "clients" for each grant

Invalid authentication request

Many PHP OAuth clients require a request body in x-www-form-urlencoded type. In the case of sendOauthRequest() request is sent with json_encode and application/json Content-Type. I fixed this issue and will provide the PR.

Update buzz (for PHP 8 support)

We are currently locked on kriswallsmith/buzz 0.15.2 but this does not support PHP 8. We will have to update to the stable v1.x version.

This has a drawback though: buzz 1.x no longer supports PHP 5, so in case we update we will have to drop PHP 5 support as well, or find a solution around it.

  • We create a new major v4.0.0 release with PHP 8 support, while still maintaining v3.x for people who need PHP 5.
  • We write a wrapper class around buzz which handles both 0.15.2 and 1.x, and keep support for PHP 5 in our 3.x branch moving forward.

Fresh install, extension could not be located

Hi there,

I am just setting up a new project on Laravel 5.4 and have pulled in your package as one of my first steps in setting up the project.

When I run vendor/bin/behat I get the following error

[Behat\Testwork\ServiceContainer\Exception\ExtensionInitializationException]
`Kielabokkie\BehatJsonApi` extension file or class could not be located.

I tried composer dump and php artisan cache:clear (for good measure) but no luck

However running composer dump -o does fix the issue. Not sure what is causing the bug but it seems strange that the optimised auto-loader is all that fixes it.

Fatal error: Call to undefined method Nyholm\Psr7\Response::getContent()

The Nyholm\Psr7\Response does not have a getConntent method!!!

This is a show stopper.
Oauth and response validation are broken.

sendOauthRequest:

protected function sendOauthRequest(array $payload)
{
$url = sprintf('%s%s', $this->baseUrl, $this->parameters['oauth']['uri']);

    $response = $this->client->post($url, $this->headers, json_encode($payload));
    **$responseContent = json_decode($response->getContent());**

public function iGetAResponse($statusCode)
{
$response = $this->getResponse();

    $contentType = $response->getHeader('Content-Type');
    **$bodyOutput = $response->getContent();**

And many other places to fix..

No assertInternalType anymore!

Newer versions of PHPUnit do not support assertInternalType(), we should use assertIs{type}() instead. I'll provide PR.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.