AreaHTTPStatusCodeTest.php in Zircon Profile 8.0
File
core/modules/views/src/Tests/Handler/AreaHTTPStatusCodeTest.php
View source
<?php
namespace Drupal\views\Tests\Handler;
use Drupal\views\Views;
class AreaHTTPStatusCodeTest extends HandlerTestBase {
public static $testViews = array(
'test_http_status_code',
);
public static $modules = array(
'node',
);
public function testHTTPStatusCodeHandler() {
$this
->drupalGet('test-http-status-code');
$this
->assertResponse(200);
$view = Views::getView('test_http_status_code');
$display =& $view->storage
->getDisplay('default');
$display['display_options']['empty']['http_status_code']['status_code'] = 418;
$view
->save();
$this
->drupalGet('test-http-status-code');
$this
->assertResponse(418);
}
}