Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SchemaRequestProcessorTest.php
Go to the documentation of this file.
1 <?php
8 
10 
12 {
19  public function testSchemaRequest($path)
20  {
21  ob_start();
22  $this->dispatch($path);
23  ob_end_clean();
24  $schema = $this->getResponse()->getBody();
25 
26  // Check that an HTTP 200 response status is visible in the schema.
27  $this->assertRegExp('/200 Success/', $schema);
28  }
29 
35  public function getResponse()
36  {
37  if (!$this->_response) {
38  $this->_response = $this->_objectManager->get(\Magento\Framework\Webapi\Rest\Response::class);
39  }
40  return $this->_response;
41  }
42 
46  public function schemaRequestProvider()
47  {
48  return [
49  ['rest/schema'],
50  ['rest/schema?services=all'],
51  ['rest/all/schema?services=all'],
52  ['rest/default/schema?services=all'],
53  ['rest/schema?services=all'],
54  ];
55  }
56 }
dispatch(\Magento\Framework\App\RequestInterface $request)
Definition: Rest.php:180