Exemple #1
0
 public function testDefaultCsrfProtectionCanBeEnabled()
 {
     Form::enableDefaultCsrfProtection();
     $form = new Form('author', new Author(), $this->validator);
     $this->assertTrue($form->isCsrfProtected());
 }
 public function testCsrfProtectionCanBeEnabled()
 {
     $form = new Form('author', array('csrf_provider' => $this->createMockCsrfProvider()));
     $this->assertTrue($form->isCsrfProtected());
 }