Changeset 22796 for branches/version-2_12-dev/tests/class/SC_Date
- Timestamp:
- 2013/05/02 18:11:36 (13 years ago)
- Location:
- branches/version-2_12-dev/tests/class/SC_Date
- Files:
-
- 9 edited
-
SC_Date_AccessorTest.php (modified) (5 diffs)
-
SC_Date_getDayTest.php (modified) (6 diffs)
-
SC_Date_getHourTest.php (modified) (4 diffs)
-
SC_Date_getMinutesIntervalTest.php (modified) (2 diffs)
-
SC_Date_getMinutesTest.php (modified) (4 diffs)
-
SC_Date_getMonthTest.php (modified) (6 diffs)
-
SC_Date_getYearTest.php (modified) (9 diffs)
-
SC_Date_getZeroMonthTest.php (modified) (3 diffs)
-
SC_Date_getZeroYearTest.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/tests/class/SC_Date/SC_Date_AccessorTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Date_AccessorTest extends Common_TestCase 28 { 27 class SC_Date_AccessorTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objDate = new SC_Date_Ex('2010','2014'); 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 testGetStartYear_startYearの値を取得する() 44 { 40 public function testGetStartYear_startYearの値を取得する() { 45 41 $this->expected = '2010'; 46 42 $this->actual = $this->objDate->getStartYear(); … … 49 45 } 50 46 51 public function testGetEndYear_endYearの値を取得する() 52 { 47 public function testGetEndYear_endYearの値を取得する() { 53 48 $this->expected = '2014'; 54 49 $this->actual = $this->objDate->getEndYear(); … … 57 52 } 58 53 59 public function testsetMonth_monthの値を設定する() 60 { 54 public function testsetMonth_monthの値を設定する() { 61 55 $this->expected = '9'; 62 56 $this->objDate->setMonth('9'); … … 66 60 } 67 61 68 public function testsetDay_dayの値を設定する() 69 { 62 public function testsetDay_dayの値を設定する() { 70 63 $this->expected = '28'; 71 64 $this->objDate->setDay('28'); -
branches/version-2_12-dev/tests/class/SC_Date/SC_Date_getDayTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Date_getDayTest extends Common_TestCase 28 { 27 class SC_Date_getDayTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objDate = new SC_Date_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 testGetDay_要素の数が31の配列を返す() 44 { 40 public function testGetDay_要素の数が31の配列を返す() { 45 41 $this->expected = 31; 46 42 $this->actual = count($this->objDate->getDay()); … … 49 45 } 50 46 51 public function testGetDay_要素の最低値が1の配列を返す() 52 { 47 public function testGetDay_要素の最低値が1の配列を返す() { 53 48 $this->expected = 1; 54 49 $this->actual = min($this->objDate->getDay()); … … 57 52 } 58 53 59 public function testGetDay_要素の最大値が31の配列を返す() 60 { 54 public function testGetDay_要素の最大値が31の配列を返す() { 61 55 $this->expected = 31; 62 56 $this->actual = max($this->objDate->getDay()); … … 65 59 } 66 60 67 public function testGetDay_TRUEを与えた場合要素の数が32の配列を返す() 68 { 61 public function testGetDay_TRUEを与えた場合要素の数が32の配列を返す() { 69 62 $this->expected = 32; 70 63 $this->actual = count($this->objDate->getDay(true)); … … 73 66 } 74 67 75 public function testGetDay_TRUEを与えた場合ーー含まれるの配列を返す() 76 { 68 public function testGetDay_TRUEを与えた場合ーー含まれるの配列を返す() { 77 69 $result = in_array('--', $this->objDate->getDay(true)); 78 70 -
branches/version-2_12-dev/tests/class/SC_Date/SC_Date_getHourTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Date_getHourTest extends Common_TestCase 28 { 27 class SC_Date_getHourTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objDate = new SC_Date_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 testGetHour_24の配列を返す() 44 { 40 public function testGetHour_24の配列を返す() { 45 41 $this->expected = 24; 46 42 $this->actual = count($this->objDate->getHour()); … … 49 45 } 50 46 51 public function testGetHour_要素の最低値が0の配列を返す() 52 { 47 public function testGetHour_要素の最低値が0の配列を返す() { 53 48 $this->expected = 0; 54 49 $this->actual = min($this->objDate->getHour()); … … 57 52 } 58 53 59 public function testGetHour_要素の最大値が23の配列を返す() 60 { 54 public function testGetHour_要素の最大値が23の配列を返す() { 61 55 $this->expected = 23; 62 56 $this->actual = max($this->objDate->getHour()); -
branches/version-2_12-dev/tests/class/SC_Date/SC_Date_getMinutesIntervalTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Date_getMinutesIntervalTest extends Common_TestCase 28 { 27 class SC_Date_getMinutesIntervalTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objDate = new SC_Date_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 testGetMinutesInterval_要素が00と30の配列を返す() 44 { 40 public function testGetMinutesInterval_要素が00と30の配列を返す() { 45 41 $this->expected = array('00'=>'00', '30'=>'30'); 46 42 $this->actual = $this->objDate->getMinutesInterval(); -
branches/version-2_12-dev/tests/class/SC_Date/SC_Date_getMinutesTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Date_getMinutesTest extends Common_TestCase 28 { 27 class SC_Date_getMinutesTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objDate = new SC_Date_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 testGetMinutes_要素の数が60の配列を返す() 44 { 40 public function testGetMinutes_要素の数が60の配列を返す() { 45 41 $this->expected = 60; 46 42 $this->actual = count($this->objDate->getMinutes()); … … 49 45 } 50 46 51 public function testGetMinutes_要素の最低値が0の配列を返す() 52 { 47 public function testGetMinutes_要素の最低値が0の配列を返す() { 53 48 $this->expected = 0; 54 49 $this->actual = min($this->objDate->getMinutes()); … … 57 52 } 58 53 59 public function testGetMinutes_要素の最大値が59の配列を返す() 60 { 54 public function testGetMinutes_要素の最大値が59の配列を返す() { 61 55 $this->expected = 59; 62 56 $this->actual = max($this->objDate->getMinutes()); -
branches/version-2_12-dev/tests/class/SC_Date/SC_Date_getMonthTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Date_getMonthTest extends Common_TestCase 28 { 27 class SC_Date_getMonthTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objDate = new SC_Date_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 testGetMonth_要素の数が12の配列を返す() 44 { 40 public function testGetMonth_要素の数が12の配列を返す() { 45 41 $this->expected = 12; 46 42 $this->actual = count($this->objDate->getMonth()); … … 49 45 } 50 46 51 public function testGetMonth_要素の最低値が1の配列を返す() 52 { 47 public function testGetMonth_要素の最低値が1の配列を返す() { 53 48 $this->expected = 1; 54 49 $this->actual = min($this->objDate->getMonth()); … … 57 52 } 58 53 59 public function testGetMonth_要素の最大値が12の配列を返す() 60 { 54 public function testGetMonth_要素の最大値が12の配列を返す() { 61 55 $this->expected = 12; 62 56 $this->actual = max($this->objDate->getMonth()); … … 65 59 } 66 60 67 public function testGetMonth_TRUEを与えた場合要素の数が13の配列を返す() 68 { 61 public function testGetMonth_TRUEを与えた場合要素の数が13の配列を返す() { 69 62 $this->expected = 13; 70 63 $this->actual = count($this->objDate->getMonth(true)); … … 73 66 } 74 67 75 public function testGetMonth_TRUEを与えた場合ーー含まれるの配列を返す() 76 { 68 public function testGetMonth_TRUEを与えた場合ーー含まれるの配列を返す() { 77 69 $result = in_array('--', $this->objDate->getMonth(true)); 78 70 -
branches/version-2_12-dev/tests/class/SC_Date/SC_Date_getYearTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Date_getYearTest extends Common_TestCase 28 { 27 class SC_Date_getYearTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objDate = new SC_Date_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 testGetYear_要素の数が4の配列を返す() 44 { 40 public function testGetYear_要素の数が4の配列を返す() { 45 41 $this->expected = 4; 46 42 $this->actual = count($this->objDate->getYear()); … … 49 45 } 50 46 51 public function testGetYear_最小値が今年の配列を返す() 52 { 47 public function testGetYear_最小値が今年の配列を返す() { 53 48 $this->expected = DATE('Y'); 54 49 $this->actual = min($this->objDate->getYear()); … … 57 52 } 58 53 59 public function testGetYear_最低値が引数の年の配列を返す() 60 { 54 public function testGetYear_最低値が引数の年の配列を返す() { 61 55 $this->expected = '2007'; 62 56 $this->actual = min($this->objDate->getYear('2007')); … … 65 59 } 66 60 67 public function testGetYear_最低値がメンバー変数の年の配列を返す() 68 { 61 public function testGetYear_最低値がメンバー変数の年の配列を返す() { 69 62 $this->expected = '2004'; 70 63 $this->objDate->setStartYear('2004'); … … 74 67 } 75 68 76 public function testGetYear_最大値が3年後の配列を返す() 77 { 69 public function testGetYear_最大値が3年後の配列を返す() { 78 70 $this->expected = DATE('Y')+3; 79 71 $this->actual = max($this->objDate->getYear()); … … 82 74 } 83 75 84 public function testGetYear_最大値がメンバ変数の配列を返す() 85 { 76 public function testGetYear_最大値がメンバ変数の配列を返す() { 86 77 $this->expected = '2020'; 87 78 $this->objDate->setEndYear('2020'); … … 91 82 } 92 83 93 public function testGetYear_デフォルト値が含まれる配列を返す() 94 { 84 public function testGetYear_デフォルト値が含まれる配列を返す() { 95 85 $result = in_array('----', $this->objDate->getYear(DATE('Y'), TRUE)); 96 86 $this->assertTrue($result, "デフォルト値"); 97 87 } 98 88 99 public function testGetYear_デフォルト値の引数に年を指定した配列を返す() 100 { 89 public function testGetYear_デフォルト値の引数に年を指定した配列を返す() { 101 90 $year = date('Y'); 102 91 $this->expected = array( $year => $year, $year+1 => $year+1 … … 107 96 } 108 97 109 public function testGetYear_引数に指定したキーがデフォルト値となる配列を返す() 110 { 98 public function testGetYear_引数に指定したキーがデフォルト値となる配列を返す() { 111 99 $this->expected = 'default'; 112 100 $return = $this->objDate->getYear(DATE('Y'), TRUE, 'default'); -
branches/version-2_12-dev/tests/class/SC_Date/SC_Date_getZeroMonthTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Date_getZeroMonthTest extends Common_TestCase 28 { 27 class SC_Date_getZeroMonthTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objDate = new SC_Date_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 testGetZeroMonth_要素の数が12の配列を返す() 44 { 40 public function testGetZeroMonth_要素の数が12の配列を返す() { 45 41 $this->expected = 12; 46 42 $this->actual = count($this->objDate->getZeroMonth()); … … 49 45 } 50 46 51 public function testGetZeroMonth_0をつけた月の配列を返す() 52 { 47 public function testGetZeroMonth_0をつけた月の配列を返す() { 53 48 $this->expected = array('01'=>'01','02'=>'02','03'=>'03' 54 49 ,'04'=>'04','05'=>'05','06'=>'06' -
branches/version-2_12-dev/tests/class/SC_Date/SC_Date_getZeroYearTest.php
r22567 r22796 25 25 require_once($HOME . "/tests/class/Common_TestCase.php"); 26 26 27 class SC_Date_getZeroYearTest extends Common_TestCase 28 { 27 class SC_Date_getZeroYearTest extends Common_TestCase { 29 28 30 protected function setUp() 31 { 29 protected function setUp() { 32 30 parent::setUp(); 33 31 $this->objDate = new SC_Date_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 testGetZeroYear_要素の数が4の配列を返す() 44 { 40 public function testGetZeroYear_要素の数が4の配列を返す() { 45 41 $this->expected = 4; 46 42 $this->actual = count($this->objDate->getZeroYear()); … … 48 44 } 49 45 50 public function testGetZeroYear_最小値が2桁表記の今年の配列を返す() 51 { 46 public function testGetZeroYear_最小値が2桁表記の今年の配列を返す() { 52 47 $this->expected = DATE('y'); 53 48 $this->actual = min($this->objDate->getZeroYear()); … … 55 50 } 56 51 57 public function testGetZeroYear_最低値が引数の年の2桁表記の配列を返す() 58 { 52 public function testGetZeroYear_最低値が引数の年の2桁表記の配列を返す() { 59 53 $this->expected = '07'; 60 54 $this->actual = min($this->objDate->getZeroYear('2007')); … … 63 57 } 64 58 65 public function testGetZeroYear_最低値がメンバー変数の年の2桁表記の配列を返す() 66 { 59 public function testGetZeroYear_最低値がメンバー変数の年の2桁表記の配列を返す() { 67 60 $this->expected = '04'; 68 61 $this->objDate->setStartYear('2004'); … … 72 65 } 73 66 74 public function testGetZeroYear_最大値が3年後の2桁表記の配列を返す() 75 { 67 public function testGetZeroYear_最大値が3年後の2桁表記の配列を返す() { 76 68 $this->expected = DATE('y')+3; 77 69 $this->actual = max($this->objDate->getZeroYear()); … … 80 72 } 81 73 82 public function testGetZeroYear_最大値がメンバ変数の2桁表記の配列を返す() 83 { 74 public function testGetZeroYear_最大値がメンバ変数の2桁表記の配列を返す() { 84 75 $this->expected = '20'; 85 76 $this->objDate->setEndYear('2020');
Note: See TracChangeset
for help on using the changeset viewer.
