@@ 64-82 (lines=19) @@ | ||
61 | * |
|
62 | * GenYear()の挙動をテストする(引数1つ) |
|
63 | */ |
|
64 | public function test_GenYear_Args1() |
|
65 | { |
|
66 | $tmpYear = date( 'Y' ) - 5; |
|
67 | $want = [ |
|
68 | '' => '', |
|
69 | $tmpYear + 0 => $tmpYear + 0, |
|
70 | $tmpYear + 1 => $tmpYear + 1, |
|
71 | $tmpYear + 2 => $tmpYear + 2, |
|
72 | $tmpYear + 3 => $tmpYear + 3, |
|
73 | $tmpYear + 4 => $tmpYear + 4, |
|
74 | $tmpYear + 5 => $tmpYear + 5, |
|
75 | $tmpYear + 6 => $tmpYear + 6, |
|
76 | $tmpYear + 7 => $tmpYear + 7, |
|
77 | $tmpYear + 8 => $tmpYear + 8, |
|
78 | $tmpYear + 9 => $tmpYear + 9, |
|
79 | ]; |
|
80 | ||
81 | $this->assertEquals( Date::genYear( true ), $want ); |
|
82 | } |
|
83 | ||
84 | /** |
|
85 | * test_GenYear_Args2() |
|
@@ 89-107 (lines=19) @@ | ||
86 | * |
|
87 | * GenYear()の挙動をテストする(引数2つ) |
|
88 | */ |
|
89 | public function test_GenYear_Args2() |
|
90 | { |
|
91 | $tmpYear = date( 'Y' ) - 5; |
|
92 | $want = [ |
|
93 | '----' => '', |
|
94 | $tmpYear + 0 => $tmpYear + 0, |
|
95 | $tmpYear + 1 => $tmpYear + 1, |
|
96 | $tmpYear + 2 => $tmpYear + 2, |
|
97 | $tmpYear + 3 => $tmpYear + 3, |
|
98 | $tmpYear + 4 => $tmpYear + 4, |
|
99 | $tmpYear + 5 => $tmpYear + 5, |
|
100 | $tmpYear + 6 => $tmpYear + 6, |
|
101 | $tmpYear + 7 => $tmpYear + 7, |
|
102 | $tmpYear + 8 => $tmpYear + 8, |
|
103 | $tmpYear + 9 => $tmpYear + 9, |
|
104 | ]; |
|
105 | ||
106 | $this->assertEquals( Date::genYear( true, '----' ), $want ); |
|
107 | } |
|
108 | ||
109 | ||
110 | /** |