Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
12345 anikendra 1
<?php
2
/**
3
 * Common test objects used in DebugKit tests
4
 *
5
 * PHP 5
6
 *
7
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
8
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
9
 *
10
 * Licensed under The MIT License
11
 * Redistributions of files must retain the above copyright notice.
12
 *
13
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
14
 * @link          http://cakephp.org CakePHP(tm) Project
15
 * @since         DebugKit 0.1
16
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
17
 */
18
 
19
App::uses('FireCake', 'DebugKit.Lib');
20
 
21
/**
22
 * TestFireCake class allows for testing of FireCake
23
 *
24
 * @since         DebugKit 0.1
25
 */
26
class TestFireCake extends FireCake {
27
 
28
/**
29
 * Headers that were sent
30
 *
31
 * @var array
32
 */
33
	public $sentHeaders = array();
34
 
35
/**
36
 * Send header
37
 *
38
 * @param $name
39
 * @param $value
40
 */
41
	protected function _sendHeader($name, $value) {
42
		$_this = FireCake::getInstance();
43
		$_this->sentHeaders[$name] = $value;
44
	}
45
 
46
/**
47
 * Skip client detection as headers are not being sent.
48
 *
49
 * @return boolean Always true
50
 */
51
	public static function detectClientExtension() {
52
		return true;
53
	}
54
 
55
/**
56
 * Reset FireCake
57
 *
58
 * @return void
59
 */
60
	public static function reset() {
61
		$_this = FireCake::getInstance();
62
		$_this->sentHeaders = array();
63
		$_this->_messageIndex = 1;
64
	}
65
}