summaryrefslogtreecommitdiff
path: root/tests/unit/Web/THttpSessionTest.php
blob: eb1ec4df50160e997d1de41cf8624b5b25180d9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php

Prado::using('System.Web.THttpSession');

/**
 * @package System.Web
 */
class THttpSessionTest extends PHPUnit_Framework_TestCase {

  public function testInit() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testOpen() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testClose() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testDestroy() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testGetIsStarted() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testSetSessionID() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testSetSessionName() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testSetSavePath() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testSetUseCustomStorage() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testSetCookieModeNone() {
    $session = new THttpSession();
    $session->CookieMode = THttpSessionCookieMode::None;

    $this->assertEquals(0, ini_get('session.use_cookies_only'));
    $this->assertEquals(0, ini_get('session.use_cookies'));
    $this->assertEquals(THttpSessionCookieMode::None, $session->CookieMode);
  }

  public function testSetCookieModeAllow() {
    $session = new THttpSession();
    $session->CookieMode = THttpSessionCookieMode::Allow;

    $this->assertEquals(0, ini_get('session.use_only_cookies'));
    $this->assertEquals(1, ini_get('session.use_cookies'));
    $this->assertEquals(THttpSessionCookieMode::Allow, $session->CookieMode);
  }

  public function testSetCookieModeAlways() {
    $session = new THttpSession();
    $session->CookieMode = THttpSessionCookieMode::Only;

    $this->assertEquals(1, ini_get('session.use_only_cookies'));
    $this->assertEquals(1, ini_get('session.use_cookies'));
    $this->assertEquals(0, ini_get('session.use_trans_sid'));
    $this->assertEquals(THttpSessionCookieMode::Only, $session->CookieMode);
  }

  public function testSetAutoStart() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testSetGProbability() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testSetUseTransparentSessionID() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testSetTimeout() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testGetIterator() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testGetCount() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testGetKeys() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testItemAt() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testAdd() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testRemove() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testContains() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testToArray() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testOffsetExists() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testOffsetGet() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testOffsetSet() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }

  public function testOffsetUnset() {
    throw new PHPUnit_Framework_IncompleteTestError();
  }
}