Revision 22128,
1.1 KB
checked in by shift_hiroko.tamagawa, 9 years ago
(diff) |
単体テスト用基盤クラスと一部テストコードを追加
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | $HOME = realpath(dirname(__FILE__)) . "/../../../.."; |
---|
4 | require_once($HOME . "/tests/class/Common_TestCase.php"); |
---|
5 | /** |
---|
6 | * |
---|
7 | */ |
---|
8 | class SC_Utils_sfIsZeroFillingTest extends Common_TestCase { |
---|
9 | |
---|
10 | protected function setUp() { |
---|
11 | parent::setUp(); |
---|
12 | } |
---|
13 | |
---|
14 | protected function tearDown() { |
---|
15 | parent::tearDown(); |
---|
16 | } |
---|
17 | |
---|
18 | ///////////////////////////////////////// |
---|
19 | public function testSfIsZeroFilling_桁数が1の場合_FALSEを返す() { |
---|
20 | $this->expected = FALSE; |
---|
21 | $this->actual = SC_Utils::sfIsZeroFilling('0'); |
---|
22 | |
---|
23 | $this->verify('ゼロ詰めされているかどうか'); |
---|
24 | } |
---|
25 | |
---|
26 | public function testSfIsZeroFilling_桁数が2以上で0埋めされていない場合_FALSEを返す() { |
---|
27 | $this->expected = FALSE; |
---|
28 | $this->actual = SC_Utils::sfIsZeroFilling('12'); |
---|
29 | |
---|
30 | $this->verify('ゼロ詰めされているかどうか'); |
---|
31 | } |
---|
32 | |
---|
33 | public function testSfIsZeroFilling_桁数が2以上で0埋めされている場合_TRUEを返す() { |
---|
34 | $this->expected = TRUE; |
---|
35 | $this->actual = SC_Utils::sfIsZeroFilling('01'); |
---|
36 | |
---|
37 | $this->verify('ゼロ詰めされているかどうか'); |
---|
38 | } |
---|
39 | |
---|
40 | } |
---|
41 | |
---|
Note: See
TracBrowser
for help on using the repository browser.