Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Test / PHPUnit / Controller / AbstractConsoleControllerTestCase.php
blobb394dc00f07a57f44bdbcdf997ec22f1ce10742a
1 <?php
3 /**
4 * Zend Framework (http://framework.zend.com/)
6 * @link http://github.com/zendframework/zf2 for the canonical source repository
7 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
8 * @license http://framework.zend.com/license/new-bsd New BSD License
9 */
10 namespace Zend\Test\PHPUnit\Controller;
12 use PHPUnit_Framework_ExpectationFailedException;
14 abstract class AbstractConsoleControllerTestCase extends AbstractControllerTestCase
16 /**
17 * HTTP controller must use the console request
18 * @var bool
20 protected $useConsoleRequest = true;
22 /**
23 * Assert console output contain content (insensible case)
25 * @param string $match content that should be contained in matched nodes
26 * @return void
28 public function assertConsoleOutputContains($match)
30 $response = $this->getResponse();
31 if (false === stripos($response->getContent(), $match)) {
32 throw new PHPUnit_Framework_ExpectationFailedException(sprintf(
33 'Failed asserting output CONTAINS content "%s", actual content is "%s"',
34 $match, $response->getContent()
35 ));
37 $this->assertNotSame(false, stripos($response->getContent(), $match));
40 /**
41 * Assert console output not contain content
43 * @param string $match content that should be contained in matched nodes
44 * @return void
46 public function assertNotConsoleOutputContains($match)
48 $response = $this->getResponse();
49 if (false !== stripos($response->getContent(), $match)) {
50 throw new PHPUnit_Framework_ExpectationFailedException(sprintf(
51 'Failed asserting output DOES NOT CONTAIN content "%s"',
52 $match
53 ));
55 $this->assertSame(false, stripos($response->getContent(), $match));