Eccube\Tests\Web\ShoppingControllerWithNonmemberTest::testShippingEditWithPostToComplete PHP Method

testShippingEditWithPostToComplete() public method

購入確認画面→お届け先の設定(非会員)→お届け先変更→購入完了
    public function testShippingEditWithPostToComplete()
    {
        $faker = $this->getFaker();
        $client = $this->createClient();
        $this->scenarioCartIn($client);
        $formData = $this->createNonmemberFormData();
        $this->scenarioInput($client, $formData);
        $crawler = $this->scenarioConfirm($client);
        $this->expected = 'ご注文内容のご確認';
        $this->actual = $crawler->filter('h1.page-heading')->text();
        $this->verify();
        // お届け先設定画面への遷移前チェック
        $shipping_edit_change_url = $crawler->filter('a.btn-shipping-edit')->attr('href');
        $crawler = $this->scenarioComplete($client, $shipping_edit_change_url);
        // お届け先設定画面へ遷移し POST 送信
        $shipping_edit_url = str_replace('shipping_edit_change', 'shipping_edit', $shipping_edit_change_url);
        $formData = $this->createNonmemberFormData();
        $formData['fax'] = array('fax01' => 111, 'fax02' => 111, 'fax03' => 111);
        unset($formData['email']);
        $crawler = $client->request('POST', $shipping_edit_url, array('shopping_shipping' => $formData));
        $this->assertTrue($client->getResponse()->isRedirect($this->app->url('shopping')));
        // ご注文完了
        $this->scenarioComplete($client, $this->app->path('shopping_confirm'));
        $BaseInfo = $this->app['eccube.repository.base_info']->get();
        $Messages = $this->getMailCatcherMessages();
        $Message = $this->getMailCatcherMessage($Messages[0]->id);
        $this->assertRegexp('/111-111-111/', $this->parseMailCatcherSource($Message), '変更した FAX 番号が一致するか');
    }