public function testGetTemplate1() { $admin = new PostAdmin('sonata.post.admin.post', 'NewsBundle\\Entity\\Post', 'SonataNewsBundle:PostAdmin'); $this->assertNull($admin->getTemplate('edit')); $admin->setTemplate('edit', 'FooAdminBundle:CRUD:edit.html.twig'); $admin->setTemplate('show', 'FooAdminBundle:CRUD:show.html.twig'); $this->assertSame('FooAdminBundle:CRUD:edit.html.twig', $admin->getTemplate('edit')); $this->assertSame('FooAdminBundle:CRUD:show.html.twig', $admin->getTemplate('show')); }