/**
  * Clear data after test.
  *
  * @return void
  */
 public function tearDown()
 {
     foreach ($this->endpoints as $endpoint) {
         $this->swaggerPage->closeEndpointContent($this->serviceName, $endpoint);
     }
     $this->swaggerPage->closeServiceContent($this->serviceName);
     $this->swaggerPage->close();
 }
 /**
  * Assert service content on swagger page
  *
  * @param SwaggerUiPage $swaggerPage
  * @param $serviceName
  * @param array $endpoints
  * @return void
  */
 public function processAssert(SwaggerUiPage $swaggerPage, $serviceName, array $endpoints)
 {
     foreach ($endpoints as $endpoint) {
         /**
          * Selector for operation
          */
         $operationSelector = 'li[id$="%s%s"]';
         $operationSelector = sprintf($operationSelector, $serviceName, $endpoint);
         \PHPUnit_Framework_Assert::assertTrue($swaggerPage->isElementVisible($operationSelector), 'REST API service endpoints on swagger page.');
     }
 }
 /**
  * Assert API info title on swagger page
  *
  * @param SwaggerUiPage $swaggerPage
  * @return void
  */
 public function processAssert(SwaggerUiPage $swaggerPage)
 {
     \PHPUnit_Framework_Assert::assertTrue($swaggerPage->isElementVisible($this->titleSelector), 'REST API info title on swagger page.');
 }
 /**
  * Assert class swagger-section on swagger page
  *
  * @param SwaggerUiPage $swaggerPage
  * @return void
  */
 public function processAssert(SwaggerUiPage $swaggerPage)
 {
     \PHPUnit_Framework_Assert::assertTrue($swaggerPage->isElementVisible($this->swaggerSectionSelector), 'Class swagger-section on swagger page.');
 }