public function testDefaultCsrfSecretCanBeSet() { Form::setDefaultCsrfSecret('foobar'); $form = new Form('author', new Author(), $this->validator); $form->enableCsrfProtection(); $this->assertEquals('foobar', $form->getCsrfSecret()); }
public function testGeneratedCsrfSecretByDefault() { $form = new Form('author', new Author(), $this->validator); $form->enableCsrfProtection(); $this->assertTrue(strlen($form->getCsrfSecret()) >= 32); }