Differential D20046 Diff 47909 src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/base/controller/__tests__/PhabricatorAccessControlTestCase.php
<?php | <?php | ||||
final class PhabricatorAccessControlTestCase extends PhabricatorTestCase { | final class PhabricatorAccessControlTestCase extends PhabricatorTestCase { | ||||
protected function getPhabricatorTestCaseConfiguration() { | protected function getPhabricatorTestCaseConfiguration() { | ||||
return array( | return array( | ||||
self::PHABRICATOR_TESTCONFIG_BUILD_STORAGE_FIXTURES => true, | self::PHABRICATOR_TESTCONFIG_BUILD_STORAGE_FIXTURES => true, | ||||
); | ); | ||||
} | } | ||||
public function testControllerAccessControls() { | public function testControllerAccessControls() { | ||||
$root = dirname(phutil_get_library_root('phabricator')); | $root = dirname(phutil_get_library_root('phabricator')); | ||||
require_once $root.'/support/startup/PhabricatorStartup.php'; | require_once $root.'/support/startup/PhabricatorStartup.php'; | ||||
$application_configuration = new AphrontDefaultApplicationConfiguration(); | $application_configuration = new AphrontApplicationConfiguration(); | ||||
$host = 'meow.example.com'; | $host = 'meow.example.com'; | ||||
$_SERVER['REQUEST_METHOD'] = 'GET'; | $_SERVER['REQUEST_METHOD'] = 'GET'; | ||||
$request = id(new AphrontRequest($host, '/')) | $request = id(new AphrontRequest($host, '/')) | ||||
->setApplicationConfiguration($application_configuration) | ->setApplicationConfiguration($application_configuration) | ||||
->setRequestData(array()); | ->setRequestData(array()); | ||||
▲ Show 20 Lines • Show All 257 Lines • Show Last 20 Lines |