mirror of
https://github.com/brmlab/brmsklad.git
synced 2025-08-05 15:43:53 +02:00
Upgrade CakePHP from 2.2.5 to 2.9.5
This commit is contained in:
parent
5a580df460
commit
235a541597
793 changed files with 60746 additions and 23753 deletions
|
@ -2,23 +2,27 @@
|
|||
/**
|
||||
* ConsoleOutputTest file
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
|
||||
* Copyright 2005-2012, Cake Software Foundation, Inc.
|
||||
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice
|
||||
*
|
||||
* @copyright Copyright 2005-2012, Cake Software Foundation, Inc.
|
||||
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
* @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
|
||||
* @package Cake.Test.Case.Console
|
||||
* @since CakePHP(tm) v 1.2.0.5432
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
App::uses('ConsoleOutput', 'Console');
|
||||
|
||||
/**
|
||||
* ConsoleOutputTest
|
||||
*
|
||||
* @package Cake.Test.Case.Console
|
||||
*/
|
||||
class ConsoleOutputTest extends CakeTestCase {
|
||||
|
||||
/**
|
||||
|
@ -90,6 +94,27 @@ class ConsoleOutputTest extends CakeTestCase {
|
|||
$this->output->write(array('Line', 'Line', 'Line'));
|
||||
}
|
||||
|
||||
/**
|
||||
* test writing an array of messages.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testOverwrite() {
|
||||
$testString = "Text";
|
||||
|
||||
$this->output->expects($this->at(0))->method('_write')
|
||||
->with($testString);
|
||||
|
||||
$this->output->expects($this->at(1))->method('_write')
|
||||
->with("");
|
||||
|
||||
$this->output->expects($this->at(2))->method('_write')
|
||||
->with("Overwriting text");
|
||||
|
||||
$this->output->write($testString, 0);
|
||||
$this->output->overwrite("Overwriting text");
|
||||
}
|
||||
|
||||
/**
|
||||
* test getting a style.
|
||||
*
|
||||
|
@ -227,6 +252,17 @@ class ConsoleOutputTest extends CakeTestCase {
|
|||
$this->output->write('<error>Bad</error> Regular', false);
|
||||
}
|
||||
|
||||
/**
|
||||
* test plain output when php://output, as php://output is
|
||||
* not compatible with posix_ functions.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testOutputAsPlainWhenOutputStream() {
|
||||
$output = $this->getMock('ConsoleOutput', array('_write'), array('php://output'));
|
||||
$this->assertEquals(ConsoleOutput::PLAIN, $output->outputAs());
|
||||
}
|
||||
|
||||
/**
|
||||
* test plain output only strips tags used for formatting.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue