CorujaStringManipulationTest Class Reference

Inheritance diagram for CorujaStringManipulationTest:

PHPUnit_Framework_TestCase

List of all members.

Public Member Functions

 testStrToBool ()
 testStrToBool2 ()
 testStrToBool3 ()
 testStrToBool4 ()
 testStrToBool5 ()
 testStrToBool6 ()
 testStrToBool7 ()
 testStrToBool8 ()
 testStrToBool9 ()
 testStrToBool10 ()
 testStrToBool11 ()
 testStrToBool12 ()
 testForceInt ()
 testForceInt2 ()
 testForceInt3 ()
 testForceInt4 ()
 testForceInt5 ()
 testForceInt6 ()
 testForceInt7 ()
 testForceInt8 ()
 testForceInt9 ()
 testForceInt10 ()
 testForceInt11 ()
 testForceInt12 ()
 testForceInt13 ()
 testForceInt14 ()
 testCamelCaseToUnderlineCase ()
 testCamelCaseToUnderlineCase2 ()
 testCamelCaseToUnderlineCase3 ()
 testCamelCaseToUnderlineCase4 ()
 testCamelCaseToUnderlineCase5 ()
 testCamelCaseToUnderlineCase6 ()
 testCamelCaseToUnderlineCase7 ()
 testCamelCaseToUnderlineCase8 ()
 testCamelCaseToUnderlineCase9 ()
 testCamelCaseToUnderlineCase10 ()

Protected Member Functions

 setUp ()
 tearDown ()

Protected Attributes

 $object


Detailed Description

Test class for CorujaStringManipulation. Generated by PHPUnit on 2008-10-28 at 14:52:27.

Definition at line 10 of file CorujaStringManipulationTest.php.


Member Function Documentation

setUp (  )  [protected]

Sets up the fixture, for example, opens a network connection. This method is called before a test is executed.

protected

Definition at line 24 of file CorujaStringManipulationTest.php.

00025     {
00026         $this->object = new CorujaStringManipulation;
00027     }

tearDown (  )  [protected]

Tears down the fixture, for example, closes a network connection. This method is called after a test is executed.

protected

Definition at line 35 of file CorujaStringManipulationTest.php.

00036     {
00037     }

testCamelCaseToUnderlineCase (  ) 

Generated from

Assert:
("test") == "TEST".

Definition at line 301 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::camelCaseToUnderlineCase().

00302     {
00303         $this->assertEquals(
00304           "TEST",
00305           CorujaStringManipulation::camelCaseToUnderlineCase("test")
00306         );
00307     }

testCamelCaseToUnderlineCase10 (  ) 

Generated from

Assert:
(false) throws InvalidArgumentException. InvalidArgumentException

Definition at line 393 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::camelCaseToUnderlineCase().

testCamelCaseToUnderlineCase2 (  ) 

Generated from

Assert:
("somethingCool") == "SOMETHING_COOL".

Definition at line 312 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::camelCaseToUnderlineCase().

00313     {
00314         $this->assertEquals(
00315           "SOMETHING_COOL",
00316           CorujaStringManipulation::camelCaseToUnderlineCase("somethingCool")
00317         );
00318     }

testCamelCaseToUnderlineCase3 (  ) 

Generated from

Assert:
("") == "".

Definition at line 323 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::camelCaseToUnderlineCase().

00324     {
00325         $this->assertEquals(
00326           "",
00327           CorujaStringManipulation::camelCaseToUnderlineCase("")
00328         );
00329     }

testCamelCaseToUnderlineCase4 (  ) 

Generated from

Assert:
("1something2Cool3") == "1SOMETHING2_COOL3".

Definition at line 334 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::camelCaseToUnderlineCase().

00335     {
00336         $this->assertEquals(
00337           "1SOMETHING2_COOL3",
00338           CorujaStringManipulation::camelCaseToUnderlineCase("1something2Cool3")
00339         );
00340     }

testCamelCaseToUnderlineCase5 (  ) 

Generated from

Assert:
("111something2222Cool333") == "111SOMETHING2222_COOL333".

Definition at line 345 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::camelCaseToUnderlineCase().

00346     {
00347         $this->assertEquals(
00348           "111SOMETHING2222_COOL333",
00349           CorujaStringManipulation::camelCaseToUnderlineCase("111something2222Cool333")
00350         );
00351     }

testCamelCaseToUnderlineCase6 (  ) 

Generated from

Assert:
(null) throws InvalidArgumentException. InvalidArgumentException

Definition at line 357 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::camelCaseToUnderlineCase().

testCamelCaseToUnderlineCase7 (  ) 

Generated from

Assert:
(123) throws InvalidArgumentException. InvalidArgumentException

Definition at line 366 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::camelCaseToUnderlineCase().

testCamelCaseToUnderlineCase8 (  ) 

Generated from

Assert:
(array()) throws InvalidArgumentException. InvalidArgumentException

Definition at line 375 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::camelCaseToUnderlineCase().

testCamelCaseToUnderlineCase9 (  ) 

Generated from

Assert:
(new stdClass()) throws InvalidArgumentException. InvalidArgumentException

Definition at line 384 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::camelCaseToUnderlineCase().

00385     {
00386         CorujaStringManipulation::camelCaseToUnderlineCase(new stdClass());
00387     }

testForceInt (  ) 

Generated from

Assert:
("a1b2c3d4") == 1234.

Definition at line 157 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::forceInt().

00158     {
00159         $this->assertEquals(
00160           1234,
00161           CorujaStringManipulation::forceInt("a1b2c3d4")
00162         );
00163     }

testForceInt10 (  ) 

Generated from

Assert:
(null) throws InvalidArgumentException. InvalidArgumentException

Definition at line 257 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::forceInt().

00258     {
00259         CorujaStringManipulation::forceInt(null);
00260     }

testForceInt11 (  ) 

Generated from

Assert:
(123) throws InvalidArgumentException. InvalidArgumentException

Definition at line 266 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::forceInt().

00267     {
00268         CorujaStringManipulation::forceInt(123);
00269     }

testForceInt12 (  ) 

Generated from

Assert:
(array()) throws InvalidArgumentException. InvalidArgumentException

Definition at line 275 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::forceInt().

00276     {
00277         CorujaStringManipulation::forceInt(array());
00278     }

testForceInt13 (  ) 

Generated from

Assert:
(new stdClass()) throws InvalidArgumentException. InvalidArgumentException

Definition at line 284 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::forceInt().

00285     {
00286         CorujaStringManipulation::forceInt(new stdClass());
00287     }

testForceInt14 (  ) 

Generated from

Assert:
(false) throws InvalidArgumentException. InvalidArgumentException

Definition at line 293 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::forceInt().

00294     {
00295         CorujaStringManipulation::forceInt(false);
00296     }

testForceInt2 (  ) 

Generated from

Assert:
("") == 0.

Definition at line 168 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::forceInt().

00169     {
00170         $this->assertEquals(
00171           0,
00172           CorujaStringManipulation::forceInt("")
00173         );
00174     }

testForceInt3 (  ) 

Generated from

Assert:
("a0a") == 0.

Definition at line 179 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::forceInt().

00180     {
00181         $this->assertEquals(
00182           0,
00183           CorujaStringManipulation::forceInt("a0a")
00184         );
00185     }

testForceInt4 (  ) 

Generated from

Assert:
("001") == 1.

Definition at line 190 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::forceInt().

00191     {
00192         $this->assertEquals(
00193           1,
00194           CorujaStringManipulation::forceInt("001")
00195         );
00196     }

testForceInt5 (  ) 

Generated from

Assert:
("abc") == 0.

Definition at line 201 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::forceInt().

00202     {
00203         $this->assertEquals(
00204           0,
00205           CorujaStringManipulation::forceInt("abc")
00206         );
00207     }

testForceInt6 (  ) 

Generated from

Assert:
("a-10") == 10.

Definition at line 212 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::forceInt().

00213     {
00214         $this->assertEquals(
00215           10,
00216           CorujaStringManipulation::forceInt("a-10")
00217         );
00218     }

testForceInt7 (  ) 

Generated from

Assert:
("-10") == -10.

Definition at line 223 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::forceInt().

00224     {
00225         $this->assertEquals(
00226           -10,
00227           CorujaStringManipulation::forceInt("-10")
00228         );
00229     }

testForceInt8 (  ) 

Generated from

Assert:
("--10") == -10.

Definition at line 234 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::forceInt().

00235     {
00236         $this->assertEquals(
00237           -10,
00238           CorujaStringManipulation::forceInt("--10")
00239         );
00240     }

testForceInt9 (  ) 

Generated from

Assert:
("-a-b-1-0-") == -10.

Definition at line 245 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::forceInt().

00246     {
00247         $this->assertEquals(
00248           -10,
00249           CorujaStringManipulation::forceInt("-a-b-1-0-")
00250         );
00251     }

testStrToBool (  ) 

Generated from

Assert:
("") == false.

Definition at line 42 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::strToBool().

00043     {
00044         $this->assertFalse(
00045           CorujaStringManipulation::strToBool("")
00046         );
00047     }

testStrToBool10 (  ) 

Generated from

Assert:
(array()) throws InvalidArgumentException. InvalidArgumentException

Definition at line 131 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::strToBool().

00132     {
00133         CorujaStringManipulation::strToBool(array());
00134     }

testStrToBool11 (  ) 

Generated from

Assert:
(new stdClass()) throws InvalidArgumentException. InvalidArgumentException

Definition at line 140 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::strToBool().

00141     {
00142         CorujaStringManipulation::strToBool(new stdClass());
00143     }

testStrToBool12 (  ) 

Generated from

Assert:
(false) throws InvalidArgumentException. InvalidArgumentException

Definition at line 149 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::strToBool().

00150     {
00151         CorujaStringManipulation::strToBool(false);
00152     }

testStrToBool2 (  ) 

Generated from

Assert:
("false") == false.

Definition at line 52 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::strToBool().

00053     {
00054         $this->assertFalse(
00055           CorujaStringManipulation::strToBool("false")
00056         );
00057     }

testStrToBool3 (  ) 

Generated from

Assert:
("FaLsE") == false.

Definition at line 62 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::strToBool().

00063     {
00064         $this->assertFalse(
00065           CorujaStringManipulation::strToBool("FaLsE")
00066         );
00067     }

testStrToBool4 (  ) 

Generated from

Assert:
("0") == false.

Definition at line 72 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::strToBool().

00073     {
00074         $this->assertFalse(
00075           CorujaStringManipulation::strToBool("0")
00076         );
00077     }

testStrToBool5 (  ) 

Generated from

Assert:
("a0a") == true.

Definition at line 82 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::strToBool().

00083     {
00084         $this->assertTrue(
00085           CorujaStringManipulation::strToBool("a0a")
00086         );
00087     }

testStrToBool6 (  ) 

Generated from

Assert:
("true") == true.

Definition at line 92 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::strToBool().

00093     {
00094         $this->assertTrue(
00095           CorujaStringManipulation::strToBool("true")
00096         );
00097     }

testStrToBool7 (  ) 

Generated from

Assert:
("1") == true.

Definition at line 102 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::strToBool().

00103     {
00104         $this->assertTrue(
00105           CorujaStringManipulation::strToBool("1")
00106         );
00107     }

testStrToBool8 (  ) 

Generated from

Assert:
(null) throws InvalidArgumentException. InvalidArgumentException

Definition at line 113 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::strToBool().

00114     {
00115         CorujaStringManipulation::strToBool(null);
00116     }

testStrToBool9 (  ) 

Generated from

Assert:
(123) throws InvalidArgumentException. InvalidArgumentException

Definition at line 122 of file CorujaStringManipulationTest.php.

References CorujaStringManipulation::strToBool().

00123     {
00124         CorujaStringManipulation::strToBool(123);
00125     }


Member Data Documentation

$object [protected]

CorujaStringManipulation protected

Definition at line 16 of file CorujaStringManipulationTest.php.


The documentation for this class was generated from the following file:

Generated on Thu Feb 3 03:55:03 2011 for CodeToDiagram by  doxygen 1.5.9