Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Commit

Permalink
Fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed Feb 10, 2016
1 parent 724db6a commit 5669d6f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Adapter/PhpcrOdmAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function createAutoRoute($uri, $contentDocument, $autoRouteTag)

if (null === $document) {
$document = new Generic();
$document->setParent($parentDocument);
$document->setParentDocument($parentDocument);
$document->setNodeName($segment);
$this->dm->persist($document);
}
Expand Down Expand Up @@ -160,7 +160,7 @@ public function createAutoRoute($uri, $contentDocument, $autoRouteTag)
$headRoute = new $this->autoRouteFqcn();
$headRoute->setContent($contentDocument);
$headRoute->setName($headName);
$headRoute->setParent($document);
$headRoute->setParentDocument($document);
$headRoute->setAutoRouteTag($autoRouteTag);
$headRoute->setType(AutoRouteInterface::TYPE_PRIMARY);

Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/EventListener/AutoRouteListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ public function testLeaveRedirectChildrenMigrations()
$parentRoute = $this->getDm()->find(null, '/test/auto-route/seo-articles/hai');
$childRoute = new AutoRoute();
$childRoute->setName('foo');
$childRoute->setParent($parentRoute);
$childRoute->setParentDocument($parentRoute);
$this->getDm()->persist($childRoute);
$this->getDm()->flush();

Expand Down Expand Up @@ -476,7 +476,7 @@ public function testMaintainRedirectParentPath()

$parentRoute = $this->getDm()->find(null, '/test/auto-route');
$autoRoute = $this->getDm()->find(null, '/test/auto-route/seo-articles/hai');
$autoRoute->setParent($parentRoute);
$autoRoute->setParentDocument($parentRoute);
$this->getDm()->persist($autoRoute);
$this->getDm()->flush();

Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/Adapter/PhpcrOdmAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function testCreateAutoRoute($path, $expectedParentPath, $expectedName, $
$this->assertInstanceOf('Symfony\Cmf\Bundle\RoutingAutoBundle\Model\AutoRoute', $res);
$this->assertEquals($expectedName, $res->getName());

$this->assertSame($this->parentRoute, $res->getParent());
$this->assertSame($this->parentRoute, $res->getParentDocument());
$this->assertSame($this->contentDocument, $res->getContent());
}

Expand Down

0 comments on commit 5669d6f

Please sign in to comment.