| Conditions | 5 |
| Paths | 9 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public static function testWithConfig($configMap, $testCallback) |
||
| 17 | { |
||
| 18 | $originalConfigValues = array(); |
||
| 19 | // Set new config values. |
||
| 20 | foreach ($configMap as $class => $config) { |
||
| 21 | foreach ($config as $key => $value) { |
||
| 22 | $originalConfigValues[$class][$key] = Config::inst()->get($class, $key); |
||
| 23 | Config::inst()->update($class, $key, $value); |
||
|
|
|||
| 24 | } |
||
| 25 | } |
||
| 26 | |||
| 27 | // Perform test with specific configuration. |
||
| 28 | $testCallback(); |
||
| 29 | |||
| 30 | // Restore original config values. |
||
| 31 | foreach ($originalConfigValues as $class => $config) { |
||
| 32 | foreach ($config as $key => $value) { |
||
| 33 | Config::inst()->update($class, $key, $value); |
||
| 34 | } |
||
| 48 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.