GraphQL\Tests\Executor\DirectivesTest::testWorksWithSkipAndIncludeDirectives PHP Method

testWorksWithSkipAndIncludeDirectives() public method

    public function testWorksWithSkipAndIncludeDirectives()
    {
        // include and no skip
        $this->assertEquals(['data' => ['a' => 'a', 'b' => 'b']], $this->executeTestQuery('{ a, b @include(if: true) @skip(if: false) }'));
        // include and skip
        $this->assertEquals(['data' => ['a' => 'a']], $this->executeTestQuery('{ a, b @include(if: true) @skip(if: true) }'));
        // no include or skip
        $this->assertEquals(['data' => ['a' => 'a']], $this->executeTestQuery('{ a, b @include(if: false) @skip(if: false) }'));
    }