From 06f945f27840b53e57795dadbc38e76f7e11ab1c Mon Sep 17 00:00:00 2001 From: Horus3 Date: Mon, 24 Feb 2014 16:42:14 +0100 Subject: init --- .../Gdata/App/CaptchaRequiredExceptionTest.php | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 zend/tests/Zend/Gdata/App/CaptchaRequiredExceptionTest.php (limited to 'zend/tests/Zend/Gdata/App/CaptchaRequiredExceptionTest.php') diff --git a/zend/tests/Zend/Gdata/App/CaptchaRequiredExceptionTest.php b/zend/tests/Zend/Gdata/App/CaptchaRequiredExceptionTest.php new file mode 100644 index 0000000..c4ada6b --- /dev/null +++ b/zend/tests/Zend/Gdata/App/CaptchaRequiredExceptionTest.php @@ -0,0 +1,58 @@ +exampleException = new Zend_Gdata_App_CaptchaRequiredException('testtoken', 'Captcha?ctoken=testtoken'); + } + + public function testExceptionContainsValidInformation() { + $this->assertEquals('testtoken', $this->exampleException->getCaptchaToken()); + $this->assertEquals('https://www.google.com/accounts/Captcha?ctoken=testtoken', $this->exampleException->getCaptchaUrl()); + } + + public function testExceptionIsThrowable() { + $caught = false; + try { + throw $this->exampleException; + } + catch(Zend_Gdata_App_CaptchaRequiredException $e) { + $caught = true; + } + + $this->assertTrue($caught); + } + +} -- cgit v1.2.3