Changeset 22796 for branches/version-2_12-dev/tests/class/SC_SiteSession
- Timestamp:
- 2013/05/02 18:11:36 (13 years ago)
- Location:
- branches/version-2_12-dev/tests/class/SC_SiteSession
- Files:
-
- 8 edited
-
SC_SiteSession_checkUniqIdTest.php (modified) (4 diffs)
-
SC_SiteSession_getUniqIdTest.php (modified) (4 diffs)
-
SC_SiteSession_getValueTest.php (modified) (2 diffs)
-
SC_SiteSession_isPrepageTest.php (modified) (5 diffs)
-
SC_SiteSession_setNowPageTest.php (modified) (2 diffs)
-
SC_SiteSession_setRegistFlagTest.php (modified) (2 diffs)
-
SC_SiteSession_setUniqIdTest.php (modified) (2 diffs)
-
SC_SiteSession_unsetUniqIdTest.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/tests/class/SC_SiteSession/SC_SiteSession_checkUniqIdTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Session_checkUniqIdTest extends Common_TestCase 28 { 27 class SC_Session_checkUniqIdTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objSiteSession = new SC_SiteSession_Ex(); 34 32 } 35 33 36 protected function tearDown() 37 { 34 protected function tearDown() { 38 35 parent::tearDown(); 39 36 } … … 41 38 ///////////////////////////////////////// 42 39 43 public function testCheckUniqId_POST値がない場合_True() 44 { 40 public function testCheckUniqId_POST値がない場合_True() { 45 41 $_POST = null; 46 42 $this->expected = true; … … 49 45 } 50 46 51 public function testCheckUniqId_POSTとセッションのUniqIDが一致する場合_True() 52 { 47 public function testCheckUniqId_POSTとセッションのUniqIDが一致する場合_True() { 53 48 $_POST['uniqid'] = '1234567890'; 54 49 $_SESSION['site']['uniqid'] = '1234567890'; … … 59 54 } 60 55 61 public function testCheckUniqId_POSTとセッションのUniqIDが一致しない場合_False() 62 { 56 public function testCheckUniqId_POSTとセッションのUniqIDが一致しない場合_False() { 63 57 $_POST['uniqid'] = '0987654321'; 64 58 $_SESSION['site']['uniqid'] = '1234567890'; -
branches/version-2_12-dev/tests/class/SC_SiteSession/SC_SiteSession_getUniqIdTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Session_getUniqIdTest extends Common_TestCase 28 { 27 class SC_Session_getUniqIdTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objSiteSession = new SC_SiteSession_Mock(); 34 32 } 35 33 36 protected function tearDown() 37 { 34 protected function tearDown() { 38 35 parent::tearDown(); 39 36 } … … 41 38 ///////////////////////////////////////// 42 39 43 public function testGetUniqId_設定済みのユニークなID取得する() 44 { 40 public function testGetUniqId_設定済みのユニークなID取得する() { 45 41 $_SESSION['site']['uniqid'] = '0987654321'; 46 42 $this->expected = '0987654321'; … … 49 45 } 50 46 51 public function testGetUniqId_新たにユニークなID取得する() 52 { 47 public function testGetUniqId_新たにユニークなID取得する() { 53 48 $_SESSION['site']['uniqid'] = ''; 54 49 $this->expected = '1234567890'; … … 58 53 } 59 54 60 class SC_SiteSession_Mock extends SC_SiteSession_Ex 61 { 62 function setUniqId() 63 { 55 class SC_SiteSession_Mock extends SC_SiteSession_Ex { 56 function setUniqId() { 64 57 $_SESSION['site']['uniqid'] = '1234567890'; 65 58 } -
branches/version-2_12-dev/tests/class/SC_SiteSession/SC_SiteSession_getValueTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Session_getValueTest extends Common_TestCase 28 { 27 class SC_Session_getValueTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objSiteSession = new SC_SiteSession_Ex(); 34 32 } 35 33 36 protected function tearDown() 37 { 34 protected function tearDown() { 38 35 parent::tearDown(); 39 36 } … … 41 38 ///////////////////////////////////////// 42 39 43 public function testSetNowPage_セッションの値を取得する() 44 { 40 public function testSetNowPage_セッションの値を取得する() { 45 41 $this->expected = $_SERVER['SCRIPT_NAME']; 46 42 $this->actual = $this->objSiteSession->getValue('now_page'); -
branches/version-2_12-dev/tests/class/SC_SiteSession/SC_SiteSession_isPrepageTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Session_isPrepageTest extends Common_TestCase 28 { 27 class SC_Session_isPrepageTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objSiteSession = new SC_SiteSession_Ex(); 34 32 } 35 33 36 protected function tearDown() 37 { 34 protected function tearDown() { 38 35 parent::tearDown(); 39 36 } … … 41 38 ///////////////////////////////////////// 42 39 43 public function testIsPrepage_sessionが空の場合_false() 44 { 40 public function testIsPrepage_sessionが空の場合_false() { 45 41 $this->expected = false; 46 42 $this->actual = $this->objSiteSession->isPrepage(); … … 48 44 } 49 45 50 public function testIsPrepage_prepageとnowpageが違う場合_false() 51 { 46 public function testIsPrepage_prepageとnowpageが違う場合_false() { 52 47 $this->expected = false; 53 48 $_SESSION['site']['pre_page'] = 'test.php'; … … 56 51 } 57 52 58 public function testIsPrepage_prepageとnowpageが同じの場合_true() 59 { 53 public function testIsPrepage_prepageとnowpageが同じの場合_true() { 60 54 $this->expected = true; 61 55 $_SESSION['site']['pre_page'] = $_SERVER['SCRIPT_NAME']; … … 64 58 } 65 59 66 public function testIsPrepage_pre_regist_successがtrueの場合_true() 67 { 60 public function testIsPrepage_pre_regist_successがtrueの場合_true() { 68 61 $this->expected = true; 69 62 $_SESSION['site']['pre_page'] = 'test.php'; -
branches/version-2_12-dev/tests/class/SC_SiteSession/SC_SiteSession_setNowPageTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Session_setNowPageTest extends Common_TestCase 28 { 27 class SC_Session_setNowPageTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objSiteSession = new SC_SiteSession_Ex(); 34 32 } 35 33 36 protected function tearDown() 37 { 34 protected function tearDown() { 38 35 parent::tearDown(); 39 36 } … … 41 38 ///////////////////////////////////////// 42 39 43 public function testSetNowPage_now_pageにパスを設定する() 44 { 40 public function testSetNowPage_now_pageにパスを設定する() { 45 41 $this->expected = 'test.php'; 46 42 $this->objSiteSession->setNowPage('test.php'); -
branches/version-2_12-dev/tests/class/SC_SiteSession/SC_SiteSession_setRegistFlagTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Session_setRegistFlagTest extends Common_TestCase 28 { 27 class SC_Session_setRegistFlagTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objSiteSession = new SC_SiteSession_Ex(); 34 32 } 35 33 36 protected function tearDown() 37 { 34 protected function tearDown() { 38 35 parent::tearDown(); 39 36 } … … 41 38 ///////////////////////////////////////// 42 39 43 public function testSetRegistFlag_TRUEがセットされる() 44 { 40 public function testSetRegistFlag_TRUEがセットされる() { 45 41 $this->objSiteSession->setRegistFlag(); 46 42 $this->assertTrue($_SESSION['site']['regist_success'],'登録成功フラグ'); -
branches/version-2_12-dev/tests/class/SC_SiteSession/SC_SiteSession_setUniqIdTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Session_setUniqIdTest extends Common_TestCase 28 { 27 class SC_Session_setUniqIdTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objSiteSession = new SC_SiteSession_Ex(); 34 32 } 35 33 36 protected function tearDown() 37 { 34 protected function tearDown() { 38 35 parent::tearDown(); 39 36 } … … 41 38 ///////////////////////////////////////// 42 39 43 public function testSetUniqId_ユニークなID設定する() 44 { 40 public function testSetUniqId_ユニークなID設定する() { 45 41 $this->objSiteSession->setUniqId(); 46 42 $this->assertNotEmpty($_SESSION['site']['uniqid'], 'ユニークID'); -
branches/version-2_12-dev/tests/class/SC_SiteSession/SC_SiteSession_unsetUniqIdTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Session_unsetUniqIdTest extends Common_TestCase 28 { 27 class SC_Session_unsetUniqIdTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objSiteSession = new SC_SiteSession_Ex(); 34 32 } 35 33 36 protected function tearDown() 37 { 34 protected function tearDown() { 38 35 parent::tearDown(); 39 36 } … … 41 38 ///////////////////////////////////////// 42 39 43 public function testUnsetUniqId_uniqIDを解除する() 44 { 40 public function testUnsetUniqId_uniqIDを解除する() { 45 41 $_SESSION['site']['uniqid'] = '1234567890'; 46 42 $this->objSiteSession->unsetUniqId();
Note: See TracChangeset
for help on using the changeset viewer.
