mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 04:40:44 +02:00
Added simple Captcha rendering test.
This commit is contained in:
29
tests/acceptance/0011_CaptchaCest.php
Normal file
29
tests/acceptance/0011_CaptchaCest.php
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
class CaptchaCest
|
||||||
|
{
|
||||||
|
public function _before(AcceptanceTester $I)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function _after(AcceptanceTester $I)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// tests
|
||||||
|
public function testSecImgOutput(AcceptanceTester $I)
|
||||||
|
{
|
||||||
|
$recnum = 1534090983051500000;
|
||||||
|
|
||||||
|
$_SESSION['secure_img'][$recnum] = 'ABCDEFG';
|
||||||
|
|
||||||
|
$I->amOnPage('/e107_images/secimg.php?id='.$recnum.'&clr=cccccc');
|
||||||
|
|
||||||
|
$I->seeResponseCodeIs(200);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@@ -26,6 +26,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private function getSitePrefExample()
|
||||||
|
{
|
||||||
|
$data = "";
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
public function testLoad()
|
public function testLoad()
|
||||||
{
|
{
|
||||||
@@ -82,6 +93,13 @@
|
|||||||
$this->assertArrayHasKey('TITLE', $actual);
|
$this->assertArrayHasKey('TITLE', $actual);
|
||||||
|
|
||||||
|
|
||||||
|
define('e_DEBUG', true);
|
||||||
|
// case sitePrefs
|
||||||
|
$string_6 = $this->getSitePrefExample();
|
||||||
|
$actual = $this->arrObj->unserialize($string_6);
|
||||||
|
|
||||||
|
// var_dump($actual);
|
||||||
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
@@ -128,7 +128,7 @@
|
|||||||
|
|
||||||
protected function _after()
|
protected function _after()
|
||||||
{
|
{
|
||||||
|
unlink(APP_PATH."/e107_files/downloadimages/butterfly.jpg");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -59,15 +59,15 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
public function testIsInstalled()
|
public function testIsInstalled()
|
||||||
{
|
{
|
||||||
$this->ep->setInstalled('some-plugin', '1.3');
|
$this->ep->setInstalled('some-plugin', '1.3');
|
||||||
|
|
||||||
$val = $this->ep->load('some-plugin')->isInstalled();
|
$val = $this->ep->load('some-plugin')->isInstalled();
|
||||||
|
|
||||||
var_dump($val);
|
// var_dump($val);
|
||||||
}
|
}*/
|
||||||
/*
|
/*
|
||||||
public function testGetDetected()
|
public function testGetDetected()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user