title: Error when using zf2 PHPUnit methods but not standard PHPUnit methods
body: <p>I upgraded to zf2.3 and am currently attempting to get my unit tests to work again as they did before. Basically, when I use the standard phpunit assertions I get no errors and my tests work as expected:</p>
  
  <h2>Test:</h2>
  
  <pre><code>public function testGetMemberHomeAction()
  {
      $this-&gt;assertEmpty(null);
  }
  </code></pre>
  
  <h2>Output:</h2>
  
  <pre><code>PHPUnit 4.1.3 by Sebastian Bergmann.
  
  Configuration read from C:\wamp\www\project\module\Member\test\phpunit.xml
  
  .
  
  Time: 141 ms, Memory: 7.25Mb
  
  ←[30;42mOK (1 test, 1 assertion)←[0m
  </code></pre>
  
  <p>However, if I try to use any of the zf2 specific assertions I get an error.</p>
  
  <h2>Test:</h2>
  
  <pre><code>public function testGetMemberHomeAction()
  {
      $this-&gt;assertModuleName('Member');
  }
  </code></pre>
  
  <h2>Output:</h2>
  
  <p>Configuration read from C:\wamp\www\project\module\Member\test\phpunit.xml</p>
  
  <pre><code>PHP Fatal error:  Call to a member function getParam() on a non-object in C:\wamp\www\project\vendor\zendframework\zendframework\library\Zend\Test\PHPUnit\Controller\AbstractControllerTestCase.php on line 472
  PHP Stack trace:
  PHP   1. {main}() C:\wamp\bin\php\php5.4.3\phpunit:0
  PHP   2. PHPUnit_TextUI_Command::main() C:\wamp\bin\php\php5.4.3\phpunit:46
  PHP   3. PHPUnit_TextUI_Command-&gt;run() C:\wamp\bin\php\php5.4.3\pear\PHPUnit\TextUI\Command.php:129
  PHP   4. PHPUnit_TextUI_TestRunner-&gt;doRun() C:\wamp\bin\php\php5.4.3\pear\PHPUnit\TextUI\Command.php:176
  PHP   5. PHPUnit_Framework_TestSuite-&gt;run() C:\wamp\www\project\vendor\phpunit\phpunit\src\TextUI\TestRunner.php:426
  PHP   6. PHPUnit_Framework_TestSuite-&gt;run() C:\wamp\www\project\vendor\phpunit\phpunit\src\Framework\TestSuite.php:675
  PHP   7. PHPUnit_Framework_TestCase-&gt;run() C:\wamp\www\project\vendor\phpunit\phpunit\src\Framework\TestSuite.php:675
  PHP   8. PHPUnit_Framework_TestResult-&gt;run() C:\wamp\www\project\vendor\phpunit\phpunit\src\Framework\TestCase.php:753
  PHP   9. PHPUnit_Framework_TestCase-&gt;runBare() C:\wamp\www\project\vendor\phpunit\phpunit\src\Framework\TestResult.php:686
  PHP  10. PHPUnit_Framework_TestCase-&gt;runTest() C:\wamp\www\project\vendor\phpunit\phpunit\src\Framework\TestCase.php:817
  PHP  11. ReflectionMethod-&gt;invokeArgs() C:\wamp\www\project\vendor\phpunit\phpunit\src\Framework\TestCase.php:951
  PHP  12. MemberTest\Controller\MemberControllerTest-&gt;testGetMemberHomeAction() C:\wamp\www\project\vendor\phpunit\phpunit\src\Framework\TestCase.php:951
  PHP  13. Zend\Test\PHPUnit\Controller\AbstractControllerTestCase-&gt;assertModuleName() C:\wamp\www\project\module\Member\test\MemberTest\Controller\MemberControllerTest.php:57
  PHP  14. Zend\Test\PHPUnit\Controller\AbstractControllerTestCase-&gt;getControllerFullClassName() C:\wamp\www\project\vendor\zendframework\zendframework\library\Zend\Test\PHPUnit\Controller\AbstractControllerTestCase.php:485
  </code></pre>
  
  <h2>My Bootstrap.php file</h2>
  
  <pre><code>namespace MemberTest;
  
  use Zend\Loader\AutoloaderFactory;
  use Zend\Mvc\Service\ServiceManagerConfig;
  use Zend\ServiceManager\ServiceManager;
  use Zend\Stdlib\ArrayUtils;
  use RuntimeException;
  
  error_reporting(E_ALL | E_STRICT);
  chdir(__DIR__);
  
  /**
   * Test bootstrap, for setting up autoloading
   */
  class Bootstrap
  {
      protected static $serviceManager;
      protected static $config;
      protected static $bootstrap;
  
      public static function init()
      {
          $zf2ModulePaths =   array(dirname(dirname(__DIR__)));
  
          if (($path = static::findParentPath('vendor')))
          {
              $zf2ModulePaths[] = $path;
          }
          if (($path = static::findParentPath('module')) !== $zf2ModulePaths[0])
          {
              $zf2ModulePaths[] = $path;
          }
  
          static::initAutoloader();
  
          // use ModuleManager to load this module and it's dependencies
          $config =   array
              (
                  'module_listener_options' =&gt; array
                               (
                                   'module_paths' =&gt; $zf2ModulePaths,
                               ),
                  'modules'             =&gt; array
                               (
                                   'Member'
                               )
              );
  
          $serviceManager = new ServiceManager(new ServiceManagerConfig());
          $serviceManager-&gt;setService('ApplicationConfig', $config);
          $serviceManager-&gt;get('ModuleManager')-&gt;loadModules();
          static::$serviceManager = $serviceManager;
      }
  
      public static function chroot()
      {
          $rootPath = dirname(static::findParentPath('module'));
          chdir($rootPath);
      }
  
      public static function getServiceManager()
      {
          return static::$serviceManager;
      }
  
      protected static function initAutoloader()
      {
          $vendorPath     =   static::findParentPath('vendor');
          $zf2Path        =   getenv('ZF2_PATH');
          if (!$zf2Path)
          {
              if (defined('ZF2_PATH'))
              {
                  $zf2Path    =   ZF2_PATH;
              }
              elseif (is_dir($vendorPath . '/ZF2/library'))
              {
                  $zf2Path    =   $vendorPath . '/ZF2/library';
              }
              elseif (is_dir($vendorPath . '/zendframework/zendframework/library'))
              {
                  $zf2Path    =   $vendorPath . '/zendframework/zendframework/library';
              }
          }
  
          if (!$zf2Path)
      {
              throw new RuntimeException
              (
                  'Unable to load ZF2. Run `php composer.phar install` or'
                  . ' define a ZF2_PATH environment variable.'
              );
          }
  
          if (file_exists($vendorPath . '/autoload.php'))
          {
              include $vendorPath . '/autoload.php';
          }
  
          include $zf2Path . '/Zend/Loader/AutoloaderFactory.php';
          AutoloaderFactory::factory( array('Zend\Loader\StandardAutoloader' =&gt; array(
          'autoregister_zf' =&gt; true,
          'namespaces' =&gt; array
          (
              __NAMESPACE__ =&gt; __DIR__ . '/' . __NAMESPACE__,
          ),
              ),
          ));
      }
  
      protected static function findParentPath($path)
      {
          $dir = __DIR__;
          $previousDir = '.';
  
          while (!is_dir($dir . '/' . $path))
          {
              $dir = dirname($dir);
              if ($previousDir === $dir)
              {
                  return false;
              }
              $previousDir = $dir;
          }
          return $dir . '/' . $path;
      }
  }
  
  Bootstrap::init();
  Bootstrap::chroot();
  </code></pre>
  
  <h2>My Test Controller</h2>
  
  <pre><code>namespace MemberTest\Controller;
  
  use MemberTest\Bootstrap;
  use Member\Controller\MemberController;
  use Zend\Http\Request;
  use Zend\Http\Response;
  use Zend\Mvc\MvcEvent;
  use Zend\Mvc\Router\RouteMatch;
  use Zend\Mvc\Router\Http\TreeRouteStack as HttpRouter;
  use PHPUnit_Framework_TestCase;
  use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase;
  
  class MemberControllerTest extends AbstractHttpControllerTestCase
  {
  protected $controller;
      protected $request;
      protected $response;
      protected $routeMatch;
      protected $event;
  
      public function setUp()
      {
      $serviceManager     = Bootstrap::getServiceManager();
          $this-&gt;controller   = new MemberController();
          $this-&gt;request      = new Request();
          $this-&gt;routeMatch   = new RouteMatch(array('controller' =&gt; 'index'));
          $this-&gt;event        = new MvcEvent();
  
          $config         = $serviceManager-&gt;get('Config');
          $routerConfig   = isset($config['router']) ? $config['router'] : array();
          $router         = HttpRouter::factory($routerConfig);
  
          $this-&gt;event-&gt;setRouter($router);
          $this-&gt;event-&gt;setRouteMatch($this-&gt;routeMatch);
          $this-&gt;controller-&gt;setEvent($this-&gt;event);
          $this-&gt;controller-&gt;setServiceLocator($serviceManager);
  
          $this-&gt;setApplicationConfig(
              include '/../../../../../config/application.config.php'
          );
  
          parent::setUp();
      }
  
  public function testGetMemberHomeAction()
  {
      $this-&gt;assertModuleName('Member');
      #$this-&gt;assertEmpty(null);
  }
  }
  </code></pre>
  
  <p>I'm at a loss for figuring out what's wrong. Compounding the issue is that with zf2.1 and the phpunit tutorial there, my phpunit tests worked without a hitch. Any ideas on why I'm getting this error?</p>