Page MenuHomeClusterLabs Projects
Diviner Tech Docs PhabricatorPolicyTestCase

final class PhabricatorPolicyTestCase
Phorge Technical Documentation (Policy)

This class is not documented.

Methods

protected function getPhabricatorTestCaseConfiguration()
Inherited

This method is not documented.
Return
wild

private function getComputedConfiguration()
Inherited

This method is not documented.
Return
wild

public function willRunTestCases($test_cases)
Inherited

This method is not documented.
Parameters
array$test_cases
Return
wild

public function didRunTestCases($test_cases)
Inherited

This method is not documented.
Parameters
array$test_cases
Return
wild

protected function willRunTests()
Inherited

This method is not documented.
Return
wild

protected function didRunTests()
Inherited

This method is not documented.
Return
wild

protected function willRunOneTest($test)
Inherited

This method is not documented.
Parameters
$test
Return
wild

protected function didRunOneTest($test)
Inherited

This method is not documented.
Parameters
$test
Return
wild

protected function newStorageFixture()
Inherited

This method is not documented.
Return
wild

protected function getNextObjectSeed()
Inherited

PhabricatorTestCase

Returns an integer seed to use when building unique identifiers (e.g., non-colliding usernames). The seed is unstable and its value will change between test runs, so your tests must not rely on it.

Return
intA unique integer.

protected function generateNewTestUser()
Inherited

This method is not documented.
Return
wild

public static function assertExecutingUnitTests()
Inherited

PhabricatorTestCase

Throws unless tests are currently executing. This method can be used to guard code which is specific to unit tests and should not normally be reachable.

If tests aren't currently being executed, throws an exception.

Return
wild

protected function requireBinaryForTest($binary)
Inherited

This method is not documented.
Parameters
$binary
Return
wild

protected function newContentSource()
Inherited

This method is not documented.
Return
wild

public function testPublicPolicyEnabled()

Verify that any user can view an object with POLICY_PUBLIC.

Return
wild

public function testPublicPolicyDisabled()

Verify that POLICY_PUBLIC is interpreted as POLICY_USER when public policies are disallowed.

Return
wild

public function testUsersPolicy()

Verify that any logged-in user can view an object with POLICY_USER, but logged-out users can not.

Return
wild

public function testAdminPolicy()

Verify that only administrators can view an object with POLICY_ADMIN.

Return
wild

public function testNoOnePolicy()

Verify that no one can view an object with POLICY_NOONE.

Return
wild

public function testOffsets()

Test offset-based filtering.

Return
wild

public function testLimits()

Test limits.

Return
wild

public function testOmnipotence()

Test that omnipotent users bypass policies.

Return
wild

public function testRejectInvalidPolicy()

Test that invalid policies reject viewers of all types.

Return
wild

public function testExtendedPolicies()

Test that extended policies work.

Return
wild

public function testExtendedPolicyCycles()

Test that cyclic extended policies are arrested properly.

Return
wild

public function testBulkExtendedPolicies()

Test bulk checks of extended policies.

This is testing an issue with extended policy filtering which allowed unusual inputs to slip objects through the filter. See D14993.

Return
wild

An omnipotent user should be able to see even objects with invalid policies.

Return
wild
This method is not documented.
Return
wild

public function testMultipleCapabilities()

This method is not documented.
Return
wild

public function testPolicyStrength()

This method is not documented.
Return
wild

private function expectVisibility($object, $map, $description)

Test an object for visibility across multiple user specifications.

Parameters
PhabricatorPolicyTestObject$object
array$map
$description
Return
wild

private function buildObject($policy)

Build a test object to spec.

Parameters
$policy
Return
wild

private function buildUser($spec)

Build a test user to spec.

Parameters
$spec
Return
wild