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