Changeset 22547
- Timestamp:
- 09/28/09 16:29:08 (4 years ago)
- Files:
-
- tools/lime/branches/2.0/lib/mock/LimeMock.php (modified) (1 diff)
- tools/lime/branches/2.0/test/unit/mock/LimeMockTest.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tools/lime/branches/2.0/lib/mock/LimeMock.php
r21377 r22547 197 197 $name = '$'.$parameter->getName(); 198 198 199 if ($parameter->isPassedByReference()) 200 { 201 $name = '&'.$name; 202 } 203 199 204 if ($parameter->isOptional()) 200 205 { tools/lime/branches/2.0/test/unit/mock/LimeMockTest.php
r21375 r22547 30 30 } 31 31 32 interface TestInterfaceWithReferenceParameters 33 { 34 public function testMethod(&$parameter); 35 } 36 32 37 abstract class TestClassAbstract 33 38 { … … 83 88 84 89 85 $t = new LimeTest(9 2);90 $t = new LimeTest(93); 86 91 87 92 … … 138 143 // assertions 139 144 $t->ok($m instanceof TestInterfaceWithTypeHints, 'The mock implements the interface'); 145 146 147 // @Test: Methods with reference parameters can be mocked 148 149 // test 150 $m = LimeMock::create('TestInterfaceWithReferenceParameters', $output); 151 // assertions 152 $t->ok($m instanceof TestInterfaceWithReferenceParameters, 'The mock implements the interface'); 140 153 141 154