PHP Class Bolt\Tests\BoltUnitTest

Author: Ross Riley ([email protected])
Inheritance: extends PHPUnit_Framework_TestCase
Afficher le fichier Open project: bolt/bolt Class Usage Examples

Méthodes protégées

Méthode Description
addDefaultUser ( Application $app )
addNewUser ( $app, $username, $displayname, $role, $enabled = true )
addSomeContent ( )
allowLogin ( $app )
checkTwigForTemplate ( Application $app, $testTemplate )
getApp ( $boot = true )
getMockAccessChecker ( Silex\Application $app, array $methods = ['isValidSession'] ) : AccessChecker | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
getMockCache ( null $path = null ) : Cache | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
getMockCsrfTokenManager ( array $methods = ['isTokenValid'] ) : Symfony\Component\Security\Csrf\CsrfTokenManager | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
getMockFlashLogger ( array $methods = ['danger', 'error', 'success'] ) : Bolt\Logger\FlashLogger | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
getMockGuzzleClient ( ) : Client | PHPUnit_Framework_MockObject_MockObject
getMockLoggerManager ( array $methods = ['clear', 'error', 'info', 'trim'] ) : Manager | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
getMockLogin ( array $methods = ['login'] ) : PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
getMockMonolog ( array $methods = ['alert', 'clear', 'debug', 'error', 'info'] ) : Logger | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
getMockPermissions ( array $methods = ['isAllowed', 'isAllowedToManipulate'] ) : Bolt\AccessControl\Permissions | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
getMockRender ( Application $app ) : Render | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
getMockStorage ( array $methods = ['getContent', 'getContentType', 'getTaxonomyType'] ) : Storage | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
getMockSwiftMailer ( array $methods = ['send'] ) : PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject | Swift_Maile\Swift_Mailer
getMockUsers ( array $methods = ['getUsers', 'isAllowed'] ) : Users | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
getService ( $key )
getTwigHandlers ( $app )
makeApp ( )
removeCSRF ( $app )
resetConfig ( )
resetDb ( )
rmdir ( $dir )
setAppPaths ( ResourceManager $config )
setService ( string $key, mixed $value )
setSessionUser ( Bolt\Storage\Entity\Users $userEntity )

Method Details

addDefaultUser() protected méthode

protected addDefaultUser ( Application $app )
$app Bolt\Application

addNewUser() protected méthode

protected addNewUser ( $app, $username, $displayname, $role, $enabled = true )

addSomeContent() protected méthode

protected addSomeContent ( )

allowLogin() protected méthode

protected allowLogin ( $app )

checkTwigForTemplate() protected méthode

protected checkTwigForTemplate ( Application $app, $testTemplate )
$app Bolt\Application

getApp() protected méthode

protected getApp ( $boot = true )

getMockAccessChecker() protected méthode

protected getMockAccessChecker ( Silex\Application $app, array $methods = ['isValidSession'] ) : AccessChecker | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
$app Silex\Application
$methods array Defaults to ['isValidSession']
Résultat Bolt\AccessControl\AccessChecker | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject

getMockCache() protected méthode

protected getMockCache ( null $path = null ) : Cache | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
$path null
Résultat Bolt\Cache | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject

getMockCsrfTokenManager() protected méthode

protected getMockCsrfTokenManager ( array $methods = ['isTokenValid'] ) : Symfony\Component\Security\Csrf\CsrfTokenManager | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
$methods array
Résultat Symfony\Component\Security\Csrf\CsrfTokenManager | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject

getMockFlashLogger() protected méthode

protected getMockFlashLogger ( array $methods = ['danger', 'error', 'success'] ) : Bolt\Logger\FlashLogger | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
$methods array
Résultat Bolt\Logger\FlashLogger | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject

getMockGuzzleClient() protected méthode

protected getMockGuzzleClient ( ) : Client | PHPUnit_Framework_MockObject_MockObject
Résultat GuzzleHttp\Client | PHPUnit_Framework_MockObject_MockObject

getMockLoggerManager() protected méthode

protected getMockLoggerManager ( array $methods = ['clear', 'error', 'info', 'trim'] ) : Manager | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
$methods array
Résultat Bolt\Logger\Manager | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject

getMockLogin() protected méthode

protected getMockLogin ( array $methods = ['login'] ) : PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
$methods array Defaults to ['login']
Résultat PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject A mocked \Bolt\AccessControl\Login

getMockMonolog() protected méthode

protected getMockMonolog ( array $methods = ['alert', 'clear', 'debug', 'error', 'info'] ) : Logger | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
$methods array
Résultat Monolog\Logger | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject

getMockPermissions() protected méthode

protected getMockPermissions ( array $methods = ['isAllowed', 'isAllowedToManipulate'] ) : Bolt\AccessControl\Permissions | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
$methods array
Résultat Bolt\AccessControl\Permissions | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject

getMockRender() protected méthode

protected getMockRender ( Application $app ) : Render | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
$app Bolt\Application
Résultat Bolt\Render | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject

getMockStorage() protected méthode

protected getMockStorage ( array $methods = ['getContent', 'getContentType', 'getTaxonomyType'] ) : Storage | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
$methods array
Résultat Bolt\Legacy\Storage | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject

getMockSwiftMailer() protected méthode

protected getMockSwiftMailer ( array $methods = ['send'] ) : PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject | Swift_Maile\Swift_Mailer
$methods array
Résultat PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject | Swift_Maile\Swift_Mailer

getMockUsers() protected méthode

protected getMockUsers ( array $methods = ['getUsers', 'isAllowed'] ) : Users | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
$methods array
Résultat Bolt\Users | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject

getService() protected méthode

protected getService ( $key )

getTwigHandlers() protected méthode

protected getTwigHandlers ( $app )

makeApp() protected méthode

protected makeApp ( )

removeCSRF() protected méthode

protected removeCSRF ( $app )

resetConfig() protected méthode

protected resetConfig ( )

resetDb() protected méthode

protected resetDb ( )

rmdir() protected méthode

protected rmdir ( $dir )

setAppPaths() protected méthode

protected setAppPaths ( ResourceManager $config )
$config Bolt\Configuration\ResourceManager

setService() protected méthode

protected setService ( string $key, mixed $value )
$key string
$value mixed

setSessionUser() protected méthode

protected setSessionUser ( Bolt\Storage\Entity\Users $userEntity )
$userEntity Bolt\Storage\Entity\Users