/**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     $this->tokenGenerator = $this->prophesize(CsrfTokenGenerator::class);
     $config_factory = $this->getConfigFactoryStub(['system.theme' => ['default' => 'bartik']]);
     $this->requestStack = new RequestStack();
     $this->negotiator = new AjaxBasePageNegotiator($this->tokenGenerator->reveal(), $config_factory, $this->requestStack);
 }
  protected function setUp() {
    parent::setUp();
    // Create the machine name controller.
    $this->tokenGenerator = $this->prophesize(CsrfTokenGenerator::class);
    $this->tokenGenerator->validate(Argument::cetera())->will(function ($args) {
      return $args[0] === 'token-' . $args[1];
    });

    $this->machineNameController = new MachineNameController(new PhpTransliteration(), $this->tokenGenerator->reveal());
  }