コード例 #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());
 }