Clones a class' interface and creates a mock version
that can have return values and expectations set.
public static generate ( string $class, string $mock_class = false, array $methods = false ) | ||
$class | string | Class to clone. |
$mock_class | string | New class name. Default is the old name with "Mock" prepended. |
$methods | array | Additional methods to add beyond those in the cloned class. Use this to emulate the dynamic addition of methods in the cloned class or when the class hasn't been written yet.sta |