HEX
Server: Apache/2.4.66 (Debian)
System: Linux 6dfabc3b2241 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64
User: (1000)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/wp-graphql/vendor/ivome/graphql-relay-php/tests/RelayTest.php
<?php
/**
 * @author: Ivo Meißner
 * Date: 29.02.16
 * Time: 17:01
 */

namespace GraphQLRelay\tests;

use GraphQL\Type\Definition\ObjectType;
use GraphQLRelay\Connection\Connection;
use GraphQLRelay\Relay;
use PHPUnit\Framework\TestCase;

class RelayTest extends TestCase
{
    public function testForwardConnectionArgs()
    {
        $this->assertEquals(
            Connection::forwardConnectionArgs(),
            Relay::forwardConnectionArgs()
        );
    }

    public function testBackwardConnectionArgs()
    {
        $this->assertEquals(
            Connection::backwardConnectionArgs(),
            Relay::backwardConnectionArgs()
        );
    }

    public function testConnectionArgs()
    {
        $this->assertEquals(
            Connection::connectionArgs(),
            Relay::connectionArgs()
        );
    }

    public function testConnectionDefinitions()
    {
        $nodeType = new ObjectType(['name' => 'test']);
        $config = ['nodeType' => $nodeType];

        $this->assertEquals(
            Connection::connectionDefinitions($config),
            Relay::connectionDefinitions($config)
        );
    }

    public function testConnectionType()
    {
        $nodeType = new ObjectType(['name' => 'test']);
        $config = ['nodeType' => $nodeType];

        $this->assertEquals(
            Connection::createConnectionType($config),
            Relay::connectionType($config)
        );
    }

    public function testEdgeType()
    {
        $nodeType = new ObjectType(['name' => 'test']);
        $config = ['nodeType' => $nodeType];

        $this->assertEquals(
            Connection::createEdgeType($config),
            Relay::edgeType($config)
        );
    }
}