예제 #1
0
파일: FormTest.php 프로젝트: rsky/symfony
 public function testDefaultCsrfProtectionCanBeEnabled()
 {
     Form::enableDefaultCsrfProtection();
     $form = new Form('author', new Author(), $this->validator);
     $this->assertTrue($form->isCsrfProtected());
 }
예제 #2
0
 public function testCsrfProtectionCanBeEnabled()
 {
     $form = new Form('author', array('csrf_provider' => $this->createMockCsrfProvider()));
     $this->assertTrue($form->isCsrfProtected());
 }