public function testShippingShippingPost()
{
$faker = $this->getFaker();
$Customer = $this->logIn();
$client = $this->client;
// カート画面
$this->scenarioCartIn($client);
// 確認画面
$crawler = $this->scenarioConfirm($client);
// お届け先の設定
$shipping_url = $crawler->filter('a.btn-shipping')->attr('href');
$crawler = $this->scenarioComplete($client, $shipping_url);
// お届け先一覧
$shipping_url = str_replace('shipping_change', 'shipping', $shipping_url);
$crawler = $client->request('GET', $shipping_url);
$this->assertTrue($client->getResponse()->isSuccessful());
$this->expected = 'お届け先の指定';
$this->actual = $crawler->filter('h1.page-heading')->text();
$this->verify();
$shipping_edit_url = $crawler->filter('a.btn-default')->attr('href');
// お届け先入力画面
$crawler = $client->request('GET', $shipping_edit_url);
$this->assertTrue($client->getResponse()->isSuccessful());
// お届け先設定画面へ遷移し POST 送信
$formData = $this->createShippingFormData();
$formData['tel'] = array('tel01' => 222, 'tel02' => 222, 'tel03' => 222);
$formData['fax'] = array('fax01' => 111, 'fax02' => 111, 'fax03' => 111);
$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);
// https://github.com/EC-CUBE/ec-cube/issues/1305
$this->assertRegexp('/111-111-111/', $this->parseMailCatcherSource($Message), '変更した FAX 番号が一致するか');
$this->assertRegexp('/222-222-222/', $this->parseMailCatcherSource($Message), '変更した 電話番号が一致するか');
}