|
@@ 43-49 (lines=7) @@
|
| 40 |
|
$this->assertTrue($type->hasField('endCursor')); |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
public function testEdgeDefinition() |
| 44 |
|
{ |
| 45 |
|
$edgeType = Connection::edgeDefinition(new StringType(), 'user'); |
| 46 |
|
$this->assertEquals('userEdge', $edgeType->getName()); |
| 47 |
|
$this->assertTrue($edgeType->hasField('node')); |
| 48 |
|
$this->assertTrue($edgeType->hasField('cursor')); |
| 49 |
|
} |
| 50 |
|
|
| 51 |
|
public function testConnectionDefinition() |
| 52 |
|
{ |
|
@@ 51-57 (lines=7) @@
|
| 48 |
|
$this->assertTrue($edgeType->hasField('cursor')); |
| 49 |
|
} |
| 50 |
|
|
| 51 |
|
public function testConnectionDefinition() |
| 52 |
|
{ |
| 53 |
|
$connection = Connection::connectionDefinition(new TestObjectType(), 'user'); |
| 54 |
|
$this->assertEquals($connection->getName(), 'userConnection'); |
| 55 |
|
$this->assertTrue($connection->hasField('pageInfo')); |
| 56 |
|
$this->assertTrue($connection->hasField('edges')); |
| 57 |
|
} |
| 58 |
|
|
| 59 |
|
} |
| 60 |
|
|