PHP 클래스 Neos\Flow\Tests\FunctionalTestCase

Subclass this base class if you want to take advantage of the framework capabilities, for example are in need of the object manager.
상속: extends BaseTestCase
파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$authenticationManager Neos\Flow\Security\Authentication\AuthenticationManagerInterface
$bootstrap Neos\Flow\Core\Bootstrap
$browser Neos\Flow\Http\Client\Browser Contains a virtual, preinitialized browser
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface A functional instance of the Object Manager, for use in concrete test cases.
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$policyService Neos\Flow\Security\Policy\PolicyService
$privilegeManager Neos\Flow\Security\Authorization\PrivilegeManagerInterface
$router Neos\Flow\Mvc\Routing\Router Contains the router instance used in the browser's request engine
$securityContext Neos\Flow\Security\Context
$testablePersistenceEnabled boolean If enabled, this test case will automatically run the compile() method on the Persistence Manager before running a test.
$testableSecurityEnabled boolean Note: this will implicitly enable testable HTTP as well.
$testingProvider Neos\Flow\Security\Authentication\Provider\TestingProvider

공개 메소드들

메소드 설명
setUp ( ) : void Sets up test requirements depending on the enabled tests.
setUpBeforeClass ( ) : void Initialize Flow
tearDown ( ) : void Tears down test requirements depending on the enabled tests

보호된 메소드들

메소드 설명
authenticateAccount ( Account $account ) : void Prepares the environment for and conducts an account authentication
authenticateRoles ( array $roleNames ) : Account Creates a new account, assigns it the given roles and authenticates it.
cleanupPersistentResourcesDirectory ( ) : void Cleans up the directory for storing persistent resources during testing
disableAuthorization ( ) : void Disables authorization for the current test
emitFunctionalTestTearDown ( ) : void Signals that the functional test case has been executed
registerRoute ( string $name, string $uriPattern, array $defaults, boolean $appendExceedingArguments = false, array $httpMethods = null ) : Route Adds a route that can be used in the functional tests
route ( Request $httpRequest ) : ActionRequest
setupHttp ( ) : void Sets up a virtual browser and web environment for seamless HTTP and MVC related tests.
setupSecurity ( ) : void Sets up security test requirements
setupSuperGlobals ( ) : void Setup super global PHP variables mocking a standard http request.
tearDownSecurity ( ) : void Resets security test requirements

메소드 상세

authenticateAccount() 보호된 메소드

Prepares the environment for and conducts an account authentication
protected authenticateAccount ( Account $account ) : void
$account Neos\Flow\Security\Account
리턴 void

authenticateRoles() 보호된 메소드

The created account is returned for further modification, for example for attaching a Party object to it.
protected authenticateRoles ( array $roleNames ) : Account
$roleNames array A list of roles the new account should have
리턴 Neos\Flow\Security\Account The created account

cleanupPersistentResourcesDirectory() 보호된 메소드

Cleans up the directory for storing persistent resources during testing

disableAuthorization() 보호된 메소드

Disables authorization for the current test
protected disableAuthorization ( ) : void
리턴 void

emitFunctionalTestTearDown() 보호된 메소드

Signals that the functional test case has been executed
protected emitFunctionalTestTearDown ( ) : void
리턴 void

registerRoute() 보호된 메소드

Adds a route that can be used in the functional tests
protected registerRoute ( string $name, string $uriPattern, array $defaults, boolean $appendExceedingArguments = false, array $httpMethods = null ) : Route
$name string Name of the route
$uriPattern string The uriPattern property of the route
$defaults array An array of defaults declarations
$appendExceedingArguments boolean If exceeding arguments may be appended
$httpMethods array An array of accepted http methods
리턴 Neos\Flow\Mvc\Routing\Route

route() 보호된 메소드

protected route ( Request $httpRequest ) : ActionRequest
$httpRequest Neos\Flow\Http\Request
리턴 Neos\Flow\Mvc\ActionRequest

setUp() 공개 메소드

If you override this method, don't forget to call parent::setUp() in your own implementation.
public setUp ( ) : void
리턴 void

setUpBeforeClass() 공개 정적인 메소드

Initialize Flow
public static setUpBeforeClass ( ) : void
리턴 void

setupHttp() 보호된 메소드

Sets up a virtual browser and web environment for seamless HTTP and MVC related tests.
protected setupHttp ( ) : void
리턴 void

setupSecurity() 보호된 메소드

Security is based on action requests so we need a working route for the TestingProvider.
protected setupSecurity ( ) : void
리턴 void

setupSuperGlobals() 보호된 정적인 메소드

Setup super global PHP variables mocking a standard http request.
protected static setupSuperGlobals ( ) : void
리턴 void

tearDown() 공개 메소드

Note: tearDown() is also called if an exception occurred in one of the tests. If the problem is caused by some security or persistence related part of Flow, the error might be hard to track because their specialized tearDown() methods might cause fatal errors. In those cases just output the original exception message by adding an echo($this->statusMessage) as the first line of this method.
public tearDown ( ) : void
리턴 void

tearDownSecurity() 보호된 메소드

Resets security test requirements
protected tearDownSecurity ( ) : void
리턴 void

프로퍼티 상세

$authenticationManager 보호되어 있는 프로퍼티

protected AuthenticationManagerInterface,Neos\Flow\Security\Authentication $authenticationManager
리턴 Neos\Flow\Security\Authentication\AuthenticationManagerInterface

$bootstrap 보호되어 있는 정적으로 프로퍼티

protected static Bootstrap,Neos\Flow\Core $bootstrap
리턴 Neos\Flow\Core\Bootstrap

$browser 보호되어 있는 프로퍼티

Contains a virtual, preinitialized browser
protected Browser,Neos\Flow\Http\Client $browser
리턴 Neos\Flow\Http\Client\Browser

$objectManager 보호되어 있는 프로퍼티

A functional instance of the Object Manager, for use in concrete test cases.
protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
리턴 Neos\Flow\ObjectManagement\ObjectManagerInterface

$persistenceManager 보호되어 있는 프로퍼티

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
리턴 Neos\Flow\Persistence\PersistenceManagerInterface

$policyService 보호되어 있는 프로퍼티

protected PolicyService,Neos\Flow\Security\Policy $policyService
리턴 Neos\Flow\Security\Policy\PolicyService

$privilegeManager 보호되어 있는 프로퍼티

protected PrivilegeManagerInterface,Neos\Flow\Security\Authorization $privilegeManager
리턴 Neos\Flow\Security\Authorization\PrivilegeManagerInterface

$router 보호되어 있는 프로퍼티

Contains the router instance used in the browser's request engine
protected Router,Neos\Flow\Mvc\Routing $router
리턴 Neos\Flow\Mvc\Routing\Router

$securityContext 보호되어 있는 프로퍼티

protected Context,Neos\Flow\Security $securityContext
리턴 Neos\Flow\Security\Context

$testablePersistenceEnabled 보호되어 있는 정적으로 프로퍼티

If enabled, this test case will automatically run the compile() method on the Persistence Manager before running a test.
protected static bool $testablePersistenceEnabled
리턴 boolean

$testableSecurityEnabled 보호되어 있는 프로퍼티

Note: this will implicitly enable testable HTTP as well.
protected bool $testableSecurityEnabled
리턴 boolean

$testingProvider 보호되어 있는 프로퍼티

protected TestingProvider,Neos\Flow\Security\Authentication\Provider $testingProvider
리턴 Neos\Flow\Security\Authentication\Provider\TestingProvider