/** * Builds a dispatcher based on the routes attached to this collection * * @return \League\Route\Dispatcher */ public function getDispatcher() { $dispatcher = new Dispatcher($this->container, $this->routes, $this->getData()); if (!is_null($this->strategy)) { $dispatcher->setStrategy($this->strategy); } return $dispatcher; }
public function testDeprovisioning() { $_GET['service_id'] = "c76ed0a4-9a04-5710-90c2-75e955697b08"; $this->testProvisioning(); $response = $this->dispatcher->dispatch(Request::METHOD_DELETE, sprintf(ServiceBrokerTest::PROVISIONING_URL, $this->instanceId)); $repo = $this->entityManager->getRepository(ServiceInstance::class); $serviceInstance = $repo->find($this->instanceId); $this->assertNull($serviceInstance); $this->assertEquals(Response::HTTP_OK, $response->getStatusCode()); $this->assertEquals('{}', $response->getContent()); }