
Public Member Functions | |
| testGetArrayFieldWithNullArray () | |
| testGetArrayFieldWithNoKey () | |
| testGetArrayFieldWithNoneArray () | |
| testGetArrayFieldWithExistingKey () | |
| testGetArrayFieldWithNoneExistingKey () | |
| testGetArrayFieldWithNoneExistingKeyAndThirdParameter () | |
| testGetArrayFieldWithNullKey () | |
Protected Member Functions | |
| setUp () | |
| tearDown () | |
Definition at line 10 of file CorujaArrayManipulationTest.php.
| 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 18 of file CorujaArrayManipulationTest.php.
| 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 28 of file CorujaArrayManipulationTest.php.
| testGetArrayFieldWithExistingKey | ( | ) |
Definition at line 90 of file CorujaArrayManipulationTest.php.
References CorujaArrayManipulation::getArrayField().
00090 { 00091 00092 // set up 00093 $array = array("one"); 00094 00095 // exercise 00096 $fieldValue = CorujaArrayManipulation::getArrayField( $array, 0 ); 00097 00098 // assert 00099 $this->assertEquals( "one", $fieldValue ); 00100 }
| testGetArrayFieldWithNoKey | ( | ) |
Definition at line 50 of file CorujaArrayManipulationTest.php.
References CorujaArrayManipulation::getArrayField().
00050 { 00051 00052 // set up 00053 $array = array("one"); 00054 00055 // exercise 00056 $fieldValue = CorujaArrayManipulation::getArrayField( $array ); 00057 00058 // assert 00059 00060 00061 // Remove the following lines when you implement this test. 00062 $this->markTestIncomplete( 00063 'Behavior not defined yet.' 00064 ); 00065 }
| testGetArrayFieldWithNoneArray | ( | ) |
Definition at line 70 of file CorujaArrayManipulationTest.php.
References CorujaArrayManipulation::getArrayField().
00070 { 00071 00072 // set up 00073 $integer = 2; 00074 00075 // exercise 00076 $fieldValue = CorujaArrayManipulation::getArrayField( $integer, 0 ); 00077 00078 // assert 00079 00080 00081 // Remove the following lines when you implement this test. 00082 $this->markTestIncomplete( 00083 'Behavior not defined yet.' 00084 ); 00085 }
| testGetArrayFieldWithNoneExistingKey | ( | ) |
Definition at line 105 of file CorujaArrayManipulationTest.php.
References CorujaArrayManipulation::getArrayField().
00105 { 00106 00107 // set up 00108 $array = array("one"); 00109 00110 // exercise 00111 $fieldValue = CorujaArrayManipulation::getArrayField( $array, 2 ); 00112 00113 // assert 00114 $this->assertNull( $fieldValue ); 00115 }
| testGetArrayFieldWithNoneExistingKeyAndThirdParameter | ( | ) |
Definition at line 120 of file CorujaArrayManipulationTest.php.
References CorujaArrayManipulation::getArrayField().
00120 { 00121 00122 // set up 00123 $array = array("one"); 00124 00125 // exercise 00126 $fieldValue = CorujaArrayManipulation::getArrayField( $array, 2, "anything" ); 00127 00128 // assert 00129 $this->assertEquals( "anything", $fieldValue ); 00130 }
| testGetArrayFieldWithNullArray | ( | ) |
Definition at line 35 of file CorujaArrayManipulationTest.php.
References CorujaArrayManipulation::getArrayField().
00035 { 00036 00037 // set up 00038 $array = null; 00039 00040 // exercise 00041 $fieldValue = CorujaArrayManipulation::getArrayField( $array ); 00042 00043 // assert 00044 $this->assertNull( $fieldValue ); 00045 }
| testGetArrayFieldWithNullKey | ( | ) |
Definition at line 135 of file CorujaArrayManipulationTest.php.
References CorujaArrayManipulation::getArrayField().
00135 { 00136 00137 // set up 00138 $array = array("one"); 00139 00140 // exercise 00141 $fieldValue = CorujaArrayManipulation::getArrayField( $array, null, "anything" ); 00142 00143 // assert 00144 $this->assertEquals( "anything", $fieldValue ); 00145 }
1.5.9