class ShoppingControllerWithNonmemberTest extends AbstractWebTestCase

Constants

MAILCATCHER_URL

MailCatcher の URL.

Properties

protected $actual from EccubeTestCase
protected $expected from EccubeTestCase
protected $client from AbstractWebTestCase
static protected $server from AbstractWebTestCase
protected $Product

Methods

setUp()

Applicaiton を生成しトランザクションを開始する.

tearDown()

トランザクションをロールバックする.

initializeDatabase()

データベースを初期化する.

Generator
getFaker(string $locale = 'ja_JP')

Faker を生成する.

verify(string $message = '')

Expected と Actual を比較する.

createCustomer(string $email = null)

Customer オブジェクトを生成して返す.

createNonMember(string $email = null)

非会員の Customer オブジェクトを生成して返す.

createProduct(string $product_name = null, integer $product_class_num = 3)

Product オブジェクトを生成して返す.

createOrder(Customer $Customer)

Order オブジェクトを生成して返す.

createPayment(Delivery $Delivery, string $method, integer $charge, integer $rule_min, integer $rule_max = 999999999)

Payment オプジェクトを生成して返す.

deleteAllRows(array $tables)

テーブルのデータを全て削除する.

createApplication()

{@inheritdoc}

cleanUpProperties()

PHPUnit_* インスタンスのプロパティを初期化する.

initializeMailCatcher()

MailCatcher を初期化する.

checkMailCatcherStatus()

MailCatcher の起動状態をチェックする.

cleanUpMailCatcherMessages()

MailCatcher のメッセージをすべて削除する.

array
getMailCatcherMessages()

MailCatcher のメッセージをすべて取得する.

object
getMailCatcherMessage(integer $id)

MailCatcher のメッセージを ID を指定して取得する.

string
parseMailCatcherSource(object $Message)

MailCatcher のメッセージソースをデコードする.

logIn($user = null)

{@inheritdoc}

testRoutingShoppingLogin()

No description

testIndexWithCartUnlock()

No description

testIndexWithCartNotFound()

No description

testConfirmWithNonmember()

非会員情報入力→購入確認画面

testCompleteWithNonmember()

非会員情報入力→購入確認画面→完了画面

testNonmemberWithCartUnlock()

No description

testNonmemberInput()

No description

testNonmemberInputWithPost()

No description

testShippingEditChange()

No description

testShippingEditChangeWithPost()

購入確認画面→お届け先の設定(非会員)

testShippingEditChangeWithPostVerify()

購入確認画面→お届け先の設定(非会員)

testShippingEdit()

No description

testShippingEditWithPostToComplete()

購入確認画面→お届け先の設定(非会員)→お届け先変更→購入完了

createNonmemberFormData()

No description

scenarioCartIn($client)

No description

scenarioInput($client, $formData)

No description

scenarioConfirm($client)

No description

scenarioComplete($client, $confirm_url)

No description

Details

at line 32
setUp()

Applicaiton を生成しトランザクションを開始する.

at line 38
tearDown()

トランザクションをロールバックする.

in EccubeTestCase at line 78
initializeDatabase()

データベースを初期化する.

データベースを初期化し、マイグレーションを行なう. 全てのデータが初期化されるため注意すること.

in EccubeTestCase at line 123
Generator getFaker(string $locale = 'ja_JP')

Faker を生成する.

Parameters

string $locale ロケールを指定する. デフォルト ja_JP

Return Value

Generator

in EccubeTestCase at line 134
verify(string $message = '')

Expected と Actual を比較する.

Parameters

string $message エラーメッセージ

in EccubeTestCase at line 145
Customer createCustomer(string $email = null)

Customer オブジェクトを生成して返す.

Parameters

string $email メールアドレス. null の場合は, ランダムなメールアドレスが生成される.

Return Value

Customer

in EccubeTestCase at line 184
Customer createNonMember(string $email = null)

非会員の Customer オブジェクトを生成して返す.

Parameters

string $email メールアドレス. null の場合は, ランダムなメールアドレスが生成される.

Return Value

Customer

in EccubeTestCase at line 226
Product createProduct(string $product_name = null, integer $product_class_num = 3)

Product オブジェクトを生成して返す.

Parameters

string $product_name 商品名. null の場合はランダムな文字列が生成される.
integer $product_class_num 商品規格の生成数

Return Value

Product

in EccubeTestCase at line 303
Order createOrder(Customer $Customer)

Order オブジェクトを生成して返す.

Parameters

Customer $Customer Customer インスタンス

Return Value

Order

in EccubeTestCase at line 375
Payment createPayment(Delivery $Delivery, string $method, integer $charge, integer $rule_min, integer $rule_max = 999999999)

Payment オプジェクトを生成して返す.

Parameters

Delivery $Delivery デフォルトで設定する配送オブジェクト
string $method 支払い方法名称
integer $charge 手数料
integer $rule_min 下限金額
integer $rule_max 上限金額

Return Value

Payment

in EccubeTestCase at line 410
deleteAllRows(array $tables)

テーブルのデータを全て削除する.

このメソッドは、参照制約の関係で、 Doctrine ORM ではデータ削除できない場合に使用する. 通常は、 EntityManager::remove() を使用して削除すること.

Parameters

array $tables 削除対象のテーブル名の配列

in EccubeTestCase at line 423
createApplication()

{@inheritdoc}

in EccubeTestCase at line 448
protected cleanUpProperties()

PHPUnit_* インスタンスのプロパティを初期化する.

このメソッドは、PHPUnit のメモリリーク解消のため、 tearDown() メソッドでコールされる.

in EccubeTestCase at line 469
protected initializeMailCatcher()

MailCatcher を初期化する.

このメソッドは主に setUp() メソッドでコールされる. MailCatcher が起動してない場合は, テストをスキップする. MailCatcher については \Eccube\Tests\Service\MailServiceTest のコメントを参照してください

See also

\Eccube\Tests\Service\MailServiceTest

in EccubeTestCase at line 490
protected checkMailCatcherStatus()

MailCatcher の起動状態をチェックする.

MailCatcher が起動していない場合は, テストをスキップする.

in EccubeTestCase at line 511
protected cleanUpMailCatcherMessages()

MailCatcher のメッセージをすべて削除する.

in EccubeTestCase at line 527
protected array getMailCatcherMessages()

MailCatcher のメッセージをすべて取得する.

Return Value

array MailCatcher のメッセージの配列

in EccubeTestCase at line 541
protected object getMailCatcherMessage(integer $id)

MailCatcher のメッセージを ID を指定して取得する.

Parameters

integer $id メッセージの ID

Return Value

object MailCatcher のメッセージ

in EccubeTestCase at line 555
protected string parseMailCatcherSource(object $Message)

MailCatcher のメッセージソースをデコードする.

Parameters

object $Message MailCatcher のメッセージ

Return Value

string デコードされた eml 形式のソース

in AbstractWebTestCase at line 53
logIn($user = null)

{@inheritdoc}

Parameters

$user

at line 44
testRoutingShoppingLogin()

at line 51
testIndexWithCartUnlock()

at line 61
testIndexWithCartNotFound()

at line 74
testConfirmWithNonmember()

非会員情報入力→購入確認画面

at line 93
testCompleteWithNonmember()

非会員情報入力→購入確認画面→完了画面

at line 120
testNonmemberWithCartUnlock()

at line 127
testNonmemberWithCustomerLogin()

at line 139
testNonmemberInput()

at line 148
testNonmemberInputWithPost()

at line 167
testShippingEditChange()

at line 189
testShippingEditChangeWithPost()

購入確認画面→お届け先の設定(非会員)

at line 211
testShippingEditChangeWithPostVerify()

購入確認画面→お届け先の設定(非会員)

at line 235
testShippingEdit()

at line 267
testShippingEditWithPostToComplete()

購入確認画面→お届け先の設定(非会員)→お届け先変更→購入完了

at line 313
createNonmemberFormData()

at line 353
protected scenarioCartIn($client)

Parameters

$client

at line 360
protected scenarioInput($client, $formData)

Parameters

$client
$formData

at line 371
protected scenarioConfirm($client)

Parameters

$client

at line 377
protected scenarioComplete($client, $confirm_url)

Parameters

$client
$confirm_url