title: Creating a mock object with default properties
body: <p>I need to create a mock object with default set of properties so it can be used elseware in the codebase upon instantiation. </p>
  
  <pre><code>$mock = $this-&gt;getMock('MyClass', array(), array(), 'MyClass_Mock');
  $mock-&gt;prop = 'foobar';
  
  $myclassMock = new get_class($mock);
  var_dump($myclassMock-&gt;prop); // NULL
  // How can I make this dump 'foobar' ?
  </code></pre>
  
  <p>I'm testing part of the framework that determines, locates, and instantiates these classes so injecting the mocked object would defeat the purpose of the test. </p>
  
  <p>I don't need to mock any methods.. just dynamically create a mocked class like so:</p>
  
  <pre><code>class MyClass_Mock extends MyClass {
    public $prop = 'foobar';
  }
  </code></pre>
  
  <p>Edit: Simplified example</p>