コード例 #1
0
ファイル: AdminTest.php プロジェクト: drmjo/SonataAdminBundle
 /**
  * @dataProvider provideGetBaseRoutePattern
  */
 public function testGetBaseRoutePatternWithChildAdmin($objFqn, $expected)
 {
     $postAdmin = new PostAdmin('sonata.post.admin.post', $objFqn, 'SonataNewsBundle:PostAdmin');
     $commentAdmin = new CommentAdmin('sonata.post.admin.comment', 'Application\\Sonata\\NewsBundle\\Entity\\Comment', 'SonataNewsBundle:CommentAdmin');
     $commentAdmin->setParent($postAdmin);
     $this->assertSame($expected . '/{id}/comment', $commentAdmin->getBaseRoutePattern());
 }
コード例 #2
0
ファイル: AdminTest.php プロジェクト: viral810/ngSimpleCMS
 public function testGetBaseRoutePatternWithChildAdmin()
 {
     $postAdmin = new PostAdmin('sonata.post.admin.post', 'Application\\Sonata\\NewsBundle\\Entity\\Post', 'SonataNewsBundle:PostAdmin');
     $commentAdmin = new CommentAdmin('sonata.post.admin.comment', 'Application\\Sonata\\NewsBundle\\Entity\\Comment', 'SonataNewsBundle:CommentAdmin');
     $commentAdmin->setParent($postAdmin);
     $this->assertEquals('/sonata/news/post/{id}/comment', $commentAdmin->getBaseRoutePattern());
 }