PHP Class Sulu\Bundle\TestBundle\Testing\SuluTestCase

Inheritance: extends Symfony\Cmf\Bundle\RoutingBundle\Tests\Functional\BaseTestCase
Afficher le fichier Open project: sulu/sulu Class Usage Examples

Protected Properties

Свойство Type Description
$importer PHPCRImporter

Méthodes publiques

Méthode Description
setUpBeforeClass ( )
tearDown ( ) Close the database connection after the tests finish.

Méthodes protégées

Méthode Description
createAuthenticatedClient ( ) : Client Create an authenticated client.
createHomeDocument ( string $name, array $locales ) Create a webspace node with the given locales.
createWebsiteClient ( ) : Client Create client for tests on the "website" context.
getEntityManager ( )
getTestUser ( ) : TestUser Return the test user (which is provided / created by the test_user_provider in this Bundle at runtime).
getTestUserId ( ) : integer Return the ID of the test user (which is provided / created by the test_user_provider in this Bundle at runtime).
initPhpcr ( ) Initialize / reset the Sulu PHPCR environment.
purgeDatabase ( ) Purge the Doctrine ORM database.
setUp ( )

Method Details

createAuthenticatedClient() protected méthode

Create an authenticated client.
protected createAuthenticatedClient ( ) : Client
Résultat Symfony\Bundle\FrameworkBundle\Client

createHomeDocument() protected méthode

Create a webspace node with the given locales.
protected createHomeDocument ( string $name, array $locales )
$name string
$locales array

createWebsiteClient() protected méthode

Create client for tests on the "website" context.
protected createWebsiteClient ( ) : Client
Résultat Symfony\Bundle\FrameworkBundle\Client

getEntityManager() protected méthode

protected getEntityManager ( )

getTestUser() protected méthode

Return the test user (which is provided / created by the test_user_provider in this Bundle at runtime).

getTestUserId() protected méthode

Return the ID of the test user (which is provided / created by the test_user_provider in this Bundle at runtime).
protected getTestUserId ( ) : integer
Résultat integer

initPhpcr() protected méthode

NOTE: We could use the document initializer here rather than manually creating the webspace nodes, but it currently adds more overhead and offers no control over *which* webspaces are created, see https://github.com/sulu-io/sulu/pull/2063 for a solution.
protected initPhpcr ( )

purgeDatabase() protected méthode

Purge the Doctrine ORM database.
protected purgeDatabase ( )

setUp() protected méthode

protected setUp ( )

setUpBeforeClass() public static méthode

public static setUpBeforeClass ( )

tearDown() public méthode

Close the database connection after the tests finish.
public tearDown ( )

Property Details

$importer protected_oe property

protected PHPCRImporter,Sulu\Bundle\TestBundle\Testing $importer
Résultat PHPCRImporter