Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of git://git.zendframework.com/zf
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelkael committed Jul 23, 2010
6 parents f7972b4 + 1f8bc83 + c5ab2f3 + 7a52da4 + bb2812c + 5d7867c commit 0abbe02
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Figlet.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function generate()
* @param mixed $element
* @return string
*/
public function render(\Zend_View_Interface $view = null, $element = null)
public function render(\Zend\View\ViewEngine $view = null, $element = null)
{
return '<pre>'
. $this->_figlet->render($this->getWord())
Expand Down
2 changes: 1 addition & 1 deletion src/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ protected function _gc()
* @param mixed $element
* @return string
*/
public function render(\Zend_View_Interface $view = null, $element = null)
public function render(\Zend\View\ViewEngine $view = null, $element = null)
{
return '<img width="' . $this->getWidth() . '" height="' . $this->getHeight() . '" alt="' . $this->getImgAlt()
. '" src="' . $this->getImgUrl() . $this->getId() . $this->getSuffix() . '" />';
Expand Down
2 changes: 1 addition & 1 deletion src/ReCaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public function isValid($value, $context = null)
* @param mixed $element
* @return string
*/
public function render(\Zend_View_Interface $view = null, $element = null)
public function render(\Zend\View\ViewEngine $view = null, $element = null)
{
return $this->getService()->getHTML();
}
Expand Down
4 changes: 2 additions & 2 deletions test/DumbTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function setUp()
unset($this->word);
}

$this->element = new \Zend_Form_Element_Captcha(
$this->element = new \Zend\Form\Element\Captcha(
'captchaD',
array(
'captcha' => array(
Expand All @@ -63,7 +63,7 @@ public function testRendersWordInReverse()
{
$id = $this->captcha->generate('test');
$word = $this->captcha->getWord();
$html = $this->captcha->render(new \Zend_View);
$html = $this->captcha->render(new \Zend\View\View);
$this->assertContains(strrev($word), $html);
$this->assertNotContains($word, $html);
}
Expand Down
9 changes: 5 additions & 4 deletions test/FigletTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* @namespace
*/
namespace ZendTest\Captcha;
use Zend\View\View;

/**
* @category Zend
Expand All @@ -47,7 +48,7 @@ public function setUp()
unset($this->word);
}

$this->element = new \Zend_Form_Element_Captcha(
$this->element = new \Zend\Form\Element\Captcha(
'captchaF',
array(
'captcha' => array(
Expand All @@ -66,7 +67,7 @@ public function testCaptchaAdapterCreated()

public function getView()
{
$view = new \Zend_View();
$view = new View();
$view->addHelperPath(__DIR__ . '/../../../../library/Zend/View/Helper');
return $view;
}
Expand All @@ -92,7 +93,7 @@ public function testCaptchaHasIdAndInput()
*/
public function testLabelIdIsCorrect()
{
$form = new \Zend_Form();
$form = new \Zend\Form\Form();
$form->setElementsBelongTo('comment');
$this->element->setLabel("My Captcha");
$form->addElement($this->element);
Expand Down Expand Up @@ -208,7 +209,7 @@ public function testWrongWordNotValid()

public function testUsesWordCaptchaDecoratorByDefault()
{
$this->assertEquals('Captcha_Word', $this->element->getCaptcha()->getDecorator());
$this->assertEquals('Captcha\\Word', $this->element->getCaptcha()->getDecorator());
}

public function testCaptchaShouldBeConfigurableViaConfigObject()
Expand Down
7 changes: 4 additions & 3 deletions test/ImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* @namespace
*/
namespace ZendTest\Captcha;
use Zend\View\View;

/**
* @category Zend
Expand Down Expand Up @@ -63,11 +64,11 @@ public function setUp()
if(!is_dir($this->testDir)) {
@mkdir($this->testDir);
}
$this->element = new \Zend_Form_Element_Captcha('captchaI',
$this->element = new \Zend\Form\Element\Captcha('captchaI',
array('captcha' => array('Image',
'sessionClass' => 'ZendTest\\Captcha\\TestAsset\\SessionContainer',
'imgDir' => $this->testDir,
'font' => __DIR__. '/../PDF/_fonts/Vera.ttf')
'font' => __DIR__. '/../Pdf/_fonts/Vera.ttf')
));
$this->captcha = $this->element->getCaptcha();
}
Expand Down Expand Up @@ -104,7 +105,7 @@ protected function _getTmpDir()

public function getView()
{
$view = new \Zend_View();
$view = new View;
$view->addHelperPath(__DIR__ . '/../../../../library/Zend/View/Helper');
return $view;
}
Expand Down
2 changes: 1 addition & 1 deletion test/ReCaptchaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function setUp()
unset($this->word);
}

$this->element = new \Zend_Form_Element_Captcha(
$this->element = new \Zend\Form\Element\Captcha(
'captchaR',
array(
'captcha' => array(
Expand Down

0 comments on commit 0abbe02

Please sign in to comment.