You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

generate_mock_once.func.php 316B

123456789101112
  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. {
  6. $mock_name = $name . 'Mock';
  7. if (class_exists($mock_name, false)) return false;
  8. Mock::generate($name, $mock_name);
  9. }
  10. // vim: et sw=4 sts=4