public function setUp() { if (!extension_loaded('gd')) { $this->markTestSkipped('The GD extension is not available.'); return; } if(!function_exists("imagepng")) { $this->markTestSkipped("Image CAPTCHA requires PNG support"); } if(!function_exists("imageftbbox")) { $this->markTestSkipped("Image CAPTCHA requires FT fonts support"); } $this->testDir = $this->getTmpDir() . '/ZF_test_images'; if (!is_dir($this->testDir)) { @mkdir($this->testDir); } $this->helper = new ImageCaptchaHelper(); $this->captcha = new ImageCaptcha(array( 'sessionClass' => 'ZendTest\Captcha\TestAsset\SessionContainer', 'imgDir' => $this->testDir, 'font' => __DIR__. '/../../../../Pdf/_fonts/Vera.ttf', )); parent::setUp(); }
public function setUp() { if (!extension_loaded('intl')) { $this->markTestSkipped('ext/intl not enabled'); } $this->helper = new FormMonthSelectHelper(); parent::setUp(); }
public function setUp() { $this->helper = new FigletCaptchaHelper(); $this->captcha = new FigletCaptcha(array( 'sessionClass' => 'ZendTest\Captcha\TestAsset\SessionContainer', )); parent::setUp(); }
public function setUp() { $this->helper = new ReCaptchaHelper(); $this->captcha = new ReCaptcha(array('sessionClass' => 'ZendTest\\Captcha\\TestAsset\\SessionContainer')); $service = $this->captcha->getService(); $service->setPublicKey($this->publicKey); $service->setPrivateKey($this->privateKey); parent::setUp(); }
public function setUp() { if (!constant('TESTS_ZEND_FORM_RECAPTCHA_SUPPORT')) { $this->markTestSkipped('Enable TESTS_ZEND_FORM_RECAPTCHA_SUPPORT to test PDF render'); } $this->helper = new ReCaptchaHelper(); $this->captcha = new ReCaptcha(array('sessionClass' => 'ZendTest\\Captcha\\TestAsset\\SessionContainer')); $service = $this->captcha->getService(); $service->setPublicKey($this->publicKey); $service->setPrivateKey($this->privateKey); parent::setUp(); }
/** * Tears down the fixture, for example, close a network connection. * This method is called after a test is executed. * * @return void */ public function tearDown() { // remove captcha images if (!isset($this->testDir)) { parent::tearDown(); return; } foreach (new DirectoryIterator($this->testDir) as $file) { if (!$file->isDot() && !$file->isDir()) { unlink($file->getPathname()); } } parent::tearDown(); }
public function setUp() { $this->helper = new FormInputHelper(); parent::setUp(); }
public function setUp() { $this->helper = new FormFileApcProgress(); parent::setUp(); }
public function setUp() { $this->helper = new FormHiddenHelper(); parent::setUp(); }
public function setUp() { $this->helper = new FormTextareaHelper(); parent::setUp(); }
public function setUp() { $this->helper = new FormDateTimeHelper(); parent::setUp(); }
public function setUp() { $this->helper = new FormNumberHelper(); parent::setUp(); }
public function setUp() { $this->helper = new FormMultiCheckboxHelper(); parent::setUp(); }
public function setUp() { $this->helper = new FormPasswordHelper(); parent::setUp(); }
public function setUp() { $this->helper = new FormMonthSelectHelper(); parent::setUp(); }
public function setUp() { $this->helper = new FormCaptchaHelper(); parent::setUp(); }
public function setUp() { $this->helper = new FormElementErrorsHelper(); parent::setUp(); }