generate_mock_once.func.php 316 B

1234567891011
  1. <?php
  2. // since Mocks can't be called from within test files, we need to do
  3. // a little jumping through hoops to generate them
  4. function generate_mock_once($name) {
  5. $mock_name = $name . 'Mock';
  6. if (class_exists($mock_name, false)) return false;
  7. Mock::generate($name, $mock_name);
  8. }
  9. // vim: et sw=4 sts=4