function let(EntityManager $em, Connection $connection, Statement $statement, ClassMetadata $classMetadata, EventManager $eventManager, TreeListener $treeListener, Nested $strategy, \ReflectionProperty $property)
 {
     $connection->prepare(Argument::any())->willReturn($statement);
     $em->getClassMetadata(Argument::any())->willReturn($classMetadata);
     $classMetadata->name = 'channel';
     $classMetadata->getReflectionProperty(Argument::any())->willReturn($property);
     $em->getConnection()->willReturn($connection);
     $em->getEventManager()->willReturn($eventManager);
     $em->getClassMetadata()->willReturn($classMetadata);
     $strategy->getName()->willReturn(Strategy::NESTED);
     $strategy->setNodePosition(Argument::cetera())->willReturn(null);
     $treeListener->getStrategy(Argument::cetera())->willReturn($strategy);
     $configuration = ['parent' => 'parent', 'left' => 'left'];
     $treeListener->getConfiguration(Argument::cetera())->willReturn($configuration);
     $eventManager->getListeners()->willReturn([[$treeListener]]);
     $this->beConstructedWith($em, $classMetadata);
 }
Exemple #2
0
 public function updateNode(EntityManager $em, $node, $parent, $position = 'FirstChild')
 {
     parent::updateNode($em, $node, $parent, $position);
     $this->updateNodePath($em, $node, $parent);
 }