AuthorityVoterTest extends EccubeTestCase
Abstract class that other unit tests can extend, provides generic methods for EC-CUBE tests.
Table of Contents
| $authorityRoleRepository | AuthorityRoleRepository | |
|---|---|---|
| $eccubeConfig | EccubeConfig | |
| $actual | ||
| $expected | ||
| $client | Client | |
| $container | ContainerInterface | |
| $entityManager | EntityManagerInterface | |
| $eccubeConfig | EccubeConfig | |
| setUp() | Client を生成しトランザクションを開始する. | mixed | 
| testVote() | mixed | |
| voteProvider() | mixed | |
| setUp() | Client を生成しトランザクションを開始する. | mixed | 
| tearDown() | トランザクションをロールバックする. | mixed | 
| getFaker() | Faker を生成する. | Generator | 
| verify() | Expected と Actual を比較する. | mixed | 
| createMember() | Member オブジェクトを生成して返す. | Member | 
| createCustomer() | Customer オブジェクトを生成して返す. | Customer | 
| createCustomerAddress() | CustomerAddress を生成して返す. | CustomerAddress | 
| createNonMember() | 非会員の Customer オブジェクトを生成して返す. | Customer | 
| createProduct() | Product オブジェクトを生成して返す. | Product | 
| createOrder() | Order オブジェクトを生成して返す. | Order | 
| createOrderWithProductClasses() | Order オブジェクトを生成して返す. | Order | 
| createPayment() | Payment オプジェクトを生成して返す. | Payment | 
| createPage() | Page オブジェクトを生成して返す | Page | 
| deleteAllRows() | テーブルのデータを全て削除する. | mixed | 
| cleanUpProperties() | PHPUnit インスタンスのプロパティを初期化する. | mixed | 
| initializeMailCatcher() | MailCatcher を初期化する. | mixed | 
| checkMailCatcherStatus() | MailCatcher の起動状態をチェックする. | mixed | 
| cleanUpMailCatcherMessages() | MailCatcher のメッセージをすべて削除する. | mixed | 
| getMailCatcherMessages() | MailCatcher のメッセージをすべて取得する. | array | 
| getMailCatcherMessage() | MailCatcher のメッセージを ID を指定して取得する. | object | 
| parseMailCatcherSource() | MailCatcher のメッセージソースをデコードする. | string | 
| getMailCollector() | Get the MailCollector | MessageDataCollector | 
| generateUrl() | Generates a URL from the given parameters. | string | 
| getCsrfToken() | Returns a CSRF token for the given ID. | CsrfToken | 
Properties
$authorityRoleRepository
        protected
                AuthorityRoleRepository
        $authorityRoleRepository
            
            
$eccubeConfig
        protected
                EccubeConfig
        $eccubeConfig
            
            
$actual
        protected
                mixed
        $actual
            
            
$expected
        protected
                mixed
        $expected
            
            
$client
        protected
                Client
        $client
            
            
$container
        protected
                ContainerInterface
        $container
            
            
$entityManager
        protected
                EntityManagerInterface
        $entityManager
            
            
$eccubeConfig
        protected
                EccubeConfig
        $eccubeConfig
            
            
Methods
setUp()
Client を生成しトランザクションを開始する.
        public
                                setUp(
                )
        : mixed
    
    
    
        
            Return values
mixedtestVote()
        public
                                testVote(
                    
                            $deniedUrls :
                array
                            
                    
            ,                 $accessUrl :
                mixed
                            
                    
            ,                 $expected :
                mixed
                            
                )
        : mixed
    
    
            Parameters
- $deniedUrls : array
- $accessUrl : mixed
- $expected : mixed
Tags
Return values
mixedvoteProvider()
        public
                                voteProvider(
                )
        : mixed
    
    
    
        
            Return values
mixedsetUp()
Client を生成しトランザクションを開始する.
        public
                                setUp(
                )
        : mixed
    
    
    
        
            Return values
mixedtearDown()
トランザクションをロールバックする.
        public
                                tearDown(
                )
        : mixed
    
    
    
        
            Return values
mixedgetFaker()
Faker を生成する.
        public
                                getFaker(
                    
            [                $locale :
                string
                 = 'ja_JP' ]            
                )
        : Generator
    
    
            Parameters
- $locale : string = 'ja_JP'
- ロケールを指定する. デフォルト ja_JP 
Tags
Return values
Generatorverify()
Expected と Actual を比較する.
        public
                                verify(
                    
            [                $message :
                string
                 = '' ]            
                )
        : mixed
    
    
            Parameters
- $message : string = ''
- エラーメッセージ 
Tags
Return values
mixedcreateMember()
Member オブジェクトを生成して返す.
        public
                                createMember(
                    
            [                $username :
                string
                 = null ]            
                )
        : Member
    
    
            Parameters
- $username : string = null
- . null の場合は, ランダムなユーザーIDが生成される. 
Return values
MembercreateCustomer()
Customer オブジェクトを生成して返す.
        public
                                createCustomer(
                    
            [                $email :
                string
                 = null ]            
                )
        : Customer
    
    
            Parameters
- $email : string = null
- メールアドレス. null の場合は, ランダムなメールアドレスが生成される. 
Return values
CustomercreateCustomerAddress()
CustomerAddress を生成して返す.
        public
                                createCustomerAddress(
                    
                            $Customer :
                Customer
                            
                    
            [,                 $is_nonmember :
                bool
                 = false ]            
                )
        : CustomerAddress
    
    
            Parameters
- $Customer : Customer
- 対象の Customer インスタンス 
- $is_nonmember : bool = false
- 非会員の場合 true 
Return values
CustomerAddresscreateNonMember()
非会員の Customer オブジェクトを生成して返す.
        public
                                createNonMember(
                    
            [                $email :
                string
                 = null ]            
                )
        : Customer
    
    
            Parameters
- $email : string = null
- メールアドレス. null の場合は, ランダムなメールアドレスが生成される. 
Return values
CustomercreateProduct()
Product オブジェクトを生成して返す.
        public
                                createProduct(
                    
            [                $product_name :
                string
                 = null ]            
                    
            [,                 $product_class_num :
                int
                 = 3 ]            
                )
        : Product
    
    
            Parameters
- $product_name : string = null
- 商品名. null の場合はランダムな文字列が生成される. 
- $product_class_num : int = 3
- 商品規格の生成数 
Return values
ProductcreateOrder()
Order オブジェクトを生成して返す.
        public
                                createOrder(
                    
                            $Customer :
                Customer
                            
                )
        : Order
    
    
            Parameters
- $Customer : Customer
- Customer インスタンス 
Return values
OrdercreateOrderWithProductClasses()
Order オブジェクトを生成して返す.
        public
                                createOrderWithProductClasses(
                    
                            $Customer :
                Customer
                            
                    
            ,                 $ProductClasses :
                \Eccube\Entity\ProductClass[]
                            
                )
        : Order
    
    
            Parameters
- $Customer : Customer
- Customer インスタンス 
- $ProductClasses : \Eccube\Entity\ProductClass[]
Return values
OrdercreatePayment()
Payment オプジェクトを生成して返す.
        public
                                createPayment(
                    
                            $Delivery :
                Delivery
                            
                    
            ,                 $method :
                string
                            
                    
            ,                 $charge :
                int
                            
                    
            ,                 $rule_min :
                int
                            
                    
            [,                 $rule_max :
                int
                 = 999999999 ]            
                )
        : Payment
    
    
            Parameters
- $Delivery : Delivery
- デフォルトで設定する配送オブジェクト 
- $method : string
- 支払い方法名称 
- $charge : int
- 手数料 
- $rule_min : int
- 下限金額 
- $rule_max : int = 999999999
- 上限金額 
Return values
PaymentcreatePage()
Page オブジェクトを生成して返す
        public
                                createPage(
                )
        : Page
    
    
    
        
            Return values
PagedeleteAllRows()
テーブルのデータを全て削除する.
        public
                                deleteAllRows(
                    
                            $tables :
                array
                            
                )
        : mixed
    
        このメソッドは、参照制約の関係で、 Doctrine ORM ではデータ削除できない場合に使用する. 通常は、 EntityManager::remove() を使用して削除すること.
Parameters
- $tables : array
- 削除対象のテーブル名の配列 
Return values
mixedcleanUpProperties()
PHPUnit インスタンスのプロパティを初期化する.
        protected
                                cleanUpProperties(
                )
        : mixed
    
        このメソッドは、PHPUnit のメモリリーク解消のため、 tearDown() メソッドでコールされる.
Tags
Return values
mixedinitializeMailCatcher()
MailCatcher を初期化する.
        protected
                                initializeMailCatcher(
                )
        : mixed
    
        このメソッドは主に setUp() メソッドでコールされる. MailCatcher が起動してない場合は, テストをスキップする. MailCatcher については \Eccube\Tests\Service\MailServiceTest のコメントを参照してください
Tags
Return values
mixedcheckMailCatcherStatus()
MailCatcher の起動状態をチェックする.
        protected
                                checkMailCatcherStatus(
                )
        : mixed
    
        MailCatcher が起動していない場合は, テストをスキップする.
Tags
Return values
mixedcleanUpMailCatcherMessages()
MailCatcher のメッセージをすべて削除する.
        protected
                                cleanUpMailCatcherMessages(
                )
        : mixed
    
    
    
            Tags
Return values
mixedgetMailCatcherMessages()
MailCatcher のメッセージをすべて取得する.
        protected
                                getMailCatcherMessages(
                )
        : array
    
    
    
            Tags
Return values
array —MailCatcher のメッセージの配列
getMailCatcherMessage()
MailCatcher のメッセージを ID を指定して取得する.
        protected
                                getMailCatcherMessage(
                    
                            $id :
                int
                            
                )
        : object
    
    
            Parameters
- $id : int
- メッセージの ID 
Tags
Return values
object —MailCatcher のメッセージ
parseMailCatcherSource()
MailCatcher のメッセージソースをデコードする.
        protected
                                parseMailCatcherSource(
                    
                            $Message :
                object
                            
                )
        : string
    
    
            Parameters
- $Message : object
- MailCatcher のメッセージ 
Tags
Return values
string —デコードされた eml 形式のソース
getMailCollector()
Get the MailCollector
        protected
                                getMailCollector(
                    
            [                $sendRequest :
                bool
                 = true ]            
                )
        : MessageDataCollector
    
    
            Parameters
- $sendRequest : bool = true
- True to send requests internally. 
Return values
MessageDataCollectorgenerateUrl()
Generates a URL from the given parameters.
        protected
                                generateUrl(
                    
                            $route :
                string
                            
                    
            [,                 $parameters :
                array
                 = [] ]            
                    
            [,                 $referenceType :
                int
                 = UrlGeneratorInterface::ABSOLUTE_PATH ]            
                )
        : string
    
    
            Parameters
- $route : string
- The name of the route 
- $parameters : array = []
- An array of parameters 
- $referenceType : int = UrlGeneratorInterface::ABSOLUTE_PATH
- The type of reference (one of the constants in UrlGeneratorInterface) 
Tags
Return values
string —The generated URL
getCsrfToken()
Returns a CSRF token for the given ID.
        protected
                                getCsrfToken(
                    
                            $csrfTokenId :
                string
                            
                )
        : CsrfToken
    
        If previously no token existed for the given ID. ATTENTION: Call this function before login.
Parameters
- $csrfTokenId : string
- The token ID (e.g. - authenticate,- <FormTypeBlockPrefix>)
Tags
Return values
CsrfToken —The CSRF token