Пример #1
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     $this->config = new ConfigForMocking(APP_ROOT_DIRECTORY . 'config/', new NullCache());
     $this->object = new Router();
     $this->object->setConfig($this->config);
     $this->config->setUnmockedClassesAllowed(true);
 }
Пример #2
0
 /**
  * Test the getClass() method when unmocked classes are allowed.
  * 
  * We expect to be able to get the class without any exceptions thrown.
  */
 public function testGetClassWhenUnmockedClassesAreAllowed()
 {
     $this->object->setUnmockedClassesAllowed(true);
     $testClass = $this->object->getClass('stdClass');
     $this->assertInstanceOf('stdClass', $testClass);
 }