public function __construct(TypeHandler $typeHandler) { $this->typeHandler = $typeHandler; $this->root = new FieldNode(); $this->root->setType('array'); $this->define(); }
public function testIsDetectingScalarCollection() { $node = new FieldNode(); $node->setType('int[]'); $this->assertTrue($node->isScalarCollection(), 'int[] should be a collection'); $node->setType('FooBar['); $this->assertFalse($node->isScalarCollection(), 'Foobar[ should no be a collection'); }