- Timestamp:
- 2013/05/02 18:11:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_sfIsIntTest.php
r22567 r22796 32 32 * @version $Id$ 33 33 */ 34 class SC_Utils_sfIsIntTest extends Common_TestCase 35 { 34 class SC_Utils_sfIsIntTest extends Common_TestCase { 36 35 37 protected function setUp() 38 { 36 protected function setUp() { 39 37 parent::setUp(); 40 38 } 41 39 42 protected function tearDown() 43 { 40 protected function tearDown() { 44 41 parent::tearDown(); 45 42 } 46 43 47 44 ///////////////////////////////////////// 48 public function testSfIsInt_0バイト文字列の場合_FALSEが返る() 49 { 45 public function testSfIsInt_0バイト文字列の場合_FALSEが返る() { 50 46 $this->expected = FALSE; 51 47 $this->actual = SC_Utils::sfIsInt(''); … … 54 50 } 55 51 56 public function testSfIsInt_intの最大長より長い場合_FALSEが返る() 57 { 52 public function testSfIsInt_intの最大長より長い場合_FALSEが返る() { 58 53 $this->expected = FALSE; 59 54 $this->actual = SC_Utils::sfIsInt('10000000000'); … … 62 57 } 63 58 64 public function testSfIsInt_intの最大値ギリギリの場合_TRUEが返る() 65 { 59 public function testSfIsInt_intの最大値ギリギリの場合_TRUEが返る() { 66 60 $this->expected = FALSE; 67 61 $this->actual = SC_Utils::sfIsInt('2147483647'); … … 70 64 } 71 65 72 public function testSfIsInt_intの最大値を超える場合_FALSEが返る() 73 { 66 public function testSfIsInt_intの最大値を超える場合_FALSEが返る() { 74 67 $this->expected = FALSE; 75 68 $this->actual = SC_Utils::sfIsInt('2147483648'); … … 78 71 } 79 72 80 public function testSfIsInt_数値でない場合_FALSEが返る() 81 { 73 public function testSfIsInt_数値でない場合_FALSEが返る() { 82 74 $this->expected = FALSE; 83 75 $this->actual = SC_Utils::sfIsInt('HELLO123'); … … 86 78 } 87 79 88 public function testSfIsInt_正の整数の場合_TRUEが返る() 89 { 80 public function testSfIsInt_正の整数の場合_TRUEが返る() { 90 81 $this->expected = TRUE; 91 82 $this->actual = SC_Utils::sfIsInt('123456789'); … … 96 87 // TODO 「整数かどうか」という関数名なのでここはFALSEになるべきでは? 97 88 /** 98 public function testSfIsInt_正の小数の場合_FALSEが返る() 99 { 89 public function testSfIsInt_正の小数の場合_FALSEが返る() { 100 90 $this->expected = FALSE; 101 91 $this->actual = SC_Utils::sfIsInt('123.456'); … … 105 95 */ 106 96 107 public function testSfIsInt_負の整数の場合_TRUEが返る() 108 { 97 public function testSfIsInt_負の整数の場合_TRUEが返る() { 109 98 $this->expected = TRUE; 110 99 $this->actual = SC_Utils::sfIsInt('-12345678'); … … 115 104 // TODO 文字列長でチェックしているので負の場合は範囲が小さくなっている 116 105 /** 117 public function testSfIsInt_負の整数で桁数が最大の場合_TRUEが返る() 118 { 106 public function testSfIsInt_負の整数で桁数が最大の場合_TRUEが返る() { 119 107 $this->expected = TRUE; 120 108 $this->actual = SC_Utils::sfIsInt('-123456789');
Note: See TracChangeset
for help on using the changeset viewer.