Esempio n. 1
0
 /**
  * @covers Sonata\AdminBundle\Admin\Admin::setUniqid
  * @covers Sonata\AdminBundle\Admin\Admin::getUniqid
  */
 public function testUniqid()
 {
     $admin = new PostAdmin('sonata.post.admin.post', 'NewsBundle\\Entity\\Post', 'SonataNewsBundle:PostAdmin');
     $uniqid = uniqid();
     $admin->setUniqid($uniqid);
     $this->assertEquals($uniqid, $admin->getUniqid());
 }
Esempio n. 2
0
 public function testToString()
 {
     $admin = new PostAdmin('sonata.post.admin.post', 'NewsBundle\\Entity\\Post', 'SonataNewsBundle:PostAdmin');
     $s = new \stdClass();
     $this->assertEquals('', $admin->toString($s));
     $s = new FooTest_Admin();
     $this->assertEquals('salut', $admin->toString($s));
 }