Esempio n. 1
0
 /**
  * @covers \DCarbone\Camel\Hump\OrderBy::fieldRef
  * @covers \DCarbone\Camel\Hump\AbstractSimpleHump::append
  * @covers \DCarbone\Camel\Node\FieldRef::__construct
  * @covers \DCarbone\Camel\Node\FieldRef::nodeName
  * @covers \DCarbone\Camel\Node\AbstractNode::setParent
  * @covers \DCarbone\Camel\Node\AbstractNode::getAllowableParents
  * @covers \DCarbone\Camel\Node\AbstractNode::attribute
  * @uses \DCarbone\Camel\Hump\OrderBy
  * @uses \DCarbone\Camel\Hump\AbstractSimpleHump
  * @uses \DCarbone\Camel\Node\AbstractNode
  * @uses \DCarbone\Camel\Node\FieldRef
  * @depends testCanGetOrderByInstance
  * @param \DCarbone\Camel\Hump\OrderBy $orderBy
  */
 public function testCanAddFieldRefNode(\DCarbone\Camel\Hump\OrderBy $orderBy)
 {
     $fieldRef = $orderBy->fieldRef('My Great Field');
     $this->assertInstanceOf('\\DCarbone\\Camel\\Node\\FieldRef', $fieldRef);
     $nodeName = $fieldRef->nodeName();
     $this->assertInternalType('string', $nodeName);
     $this->assertEquals('FieldRef', $nodeName);
 }
Esempio n. 2
0
 /**
  * @param OrderBy $orderBy
  * @return $this
  */
 public function setOrderBy(OrderBy $orderBy)
 {
     $this->orderBy = $orderBy;
     $this->orderBy->setCamel($this);
     return $this;
 }