MockInvokeController example

// Tests a request with no controller specified.       [[], FALSE],
    ];
  }

  /** * Tests getControllerFromDefinition(). * * @dataProvider providerTestGetControllerFromDefinition */
  public function testGetControllerFromDefinition($definition$output) {
    $this->container->set('invoke_service', new MockInvokeController());
    $controller = $this->controllerResolver->getControllerFromDefinition($definition);
    $this->assertCallableController($controller, NULL, $output);
  }

  /** * Provides test data for testGetControllerFromDefinition(). */
  public function providerTestGetControllerFromDefinition() {
    return [
      // Tests a method on an object.       [[new MockController(), 'getResult'], 'This is a regular controller.'],
      
Home | Imprint | This part of the site doesn't use cookies.