PHP Class Bolt\Tests\BoltUnitTest

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

Protected Methods

Method 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 method

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

addNewUser() protected method

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

addSomeContent() protected method

protected addSomeContent ( )

allowLogin() protected method

protected allowLogin ( $app )

checkTwigForTemplate() protected method

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

getApp() protected method

protected getApp ( $boot = true )

getMockAccessChecker() protected method

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']
return Bolt\AccessControl\AccessChecker | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject

getMockCache() protected method

protected getMockCache ( null $path = null ) : Cache | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
$path null
return Bolt\Cache | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject

getMockCsrfTokenManager() protected method

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

getMockFlashLogger() protected method

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

getMockGuzzleClient() protected method

protected getMockGuzzleClient ( ) : Client | PHPUnit_Framework_MockObject_MockObject
return GuzzleHttp\Client | PHPUnit_Framework_MockObject_MockObject

getMockLoggerManager() protected method

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

getMockLogin() protected method

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

getMockMonolog() protected method

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

getMockPermissions() protected method

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

getMockRender() protected method

protected getMockRender ( Application $app ) : Render | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject
$app Bolt\Application
return Bolt\Render | PHPUnit_Framework_MockObject_MockObjec\PHPUnit_Framework_MockObject_MockObject

getMockStorage() protected method

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

getMockSwiftMailer() protected method

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

getMockUsers() protected method

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

getService() protected method

protected getService ( $key )

getTwigHandlers() protected method

protected getTwigHandlers ( $app )

makeApp() protected method

protected makeApp ( )

removeCSRF() protected method

protected removeCSRF ( $app )

resetConfig() protected method

protected resetConfig ( )

resetDb() protected method

protected resetDb ( )

rmdir() protected method

protected rmdir ( $dir )

setAppPaths() protected method

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

setService() protected method

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

setSessionUser() protected method

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