Skip to content
This repository was archived by the owner on Feb 10, 2019. It is now read-only.
This repository was archived by the owner on Feb 10, 2019. It is now read-only.

Testing coverage with GraphQL is always return 0% #384

Open
@hoangnkvti

Description

@hoangnkvti

Hi,

I want to test my code coverage, so I am using php unit with xdebug.

I have a function like this:

   /**
   * @test
   */
  public function getReturnOk()
  {
      $query = 'query{clients{clname, is_mypage_event}}';
      $response = $this->withoutMiddleware()->get('graphql/secret?query=' . $query);
      $response->assertStatus(Response::HTTP_OK);
  }

But when I execute ./vendor/bin/phpunit --coverage-html coverage, the coverage result is 0%, means that no line was executed

Was my test method wrong??

Thank you so much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions