상속: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
예제 #1
0
 /**
  * It should set the order on the document.
  */
 public function testHydrateOrder()
 {
     $this->encoder->systemName('order')->willReturn('sys:order');
     $this->node->getPropertyValueWithDefault('sys:order', null)->willReturn(50);
     $this->accessor->set('suluOrder', 50)->shouldBeCalled();
     $this->subscriber->handleHydrate($this->hydrateEvent->reveal());
 }
예제 #2
0
 /**
  * It should set the order on the document.
  */
 public function testPersistOrder()
 {
     $this->node->getParent()->willReturn($this->parentNode->reveal());
     $this->parentNode->getNodes()->willReturn([$this->node->reveal()]);
     $this->persistEvent->getAccessor()->willReturn($this->accessor->reveal());
     $this->accessor->set('suluOrder', 20)->shouldBeCalled();
     $this->subscriber->handlePersist($this->persistEvent->reveal());
 }