FooTest.php 833 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace OSInet\Testable;
  3. require_once "misc/psr0.php";
  4. spl_autoload_register('psr0_autoload');
  5. class FooTest extends \PHPUnit_Framework_TestCase{
  6. /**
  7. * @var \OSInet\Testable\Foo
  8. */
  9. public $foo;
  10. /**
  11. * @var \OSInet\Testable\Foo
  12. */
  13. public $foo2;
  14. /**
  15. * Prepares the environment before running a test.
  16. */
  17. protected function setUp() {
  18. parent::setUp();
  19. $this->foo = $this->getMock('OSInet\Testable\Foo', NULL, array('bar', 'qux'));
  20. $rc = new \ReflectionClass($this->foo);
  21. print_r($rc->getMethods());
  22. $this->foo2 = $this->getMockBuilder('OSInet\Testable\Foo')
  23. ->getMock();
  24. $rc = new \ReflectionClass($this->foo2);
  25. print_r($rc->getMethods());
  26. }
  27. public function testCall() {
  28. $this->foo->call('http://example.com', array('system.listMethods', array()));
  29. }
  30. }