Eccube\Tests\Web\Admin\Order\MailControllerTest::testMailAllWithComplete PHP Method

testMailAllWithComplete() public method

    public function testMailAllWithComplete()
    {
        $ids = array();
        for ($i = 0; $i < 5; $i++) {
            $Order = $this->createOrder($this->Customer);
            $ids[] = $Order->getId();
        }
        $form = $this->createFormData();
        $crawler = $this->client->request('POST', $this->app->url('admin_order_mail_all'), array('mail' => $form, 'mode' => 'complete', 'ids' => implode(',', $ids)));
        $this->assertTrue($this->client->getResponse()->isRedirect($this->app->url('admin_order_mail_complete')));
        $Messages = $this->getMailCatcherMessages();
        $this->expected = 10;
        $this->actual = count($Messages);
        $this->verify();
        $Message = $this->getMailCatcherMessage($Messages[0]->id);
        $BaseInfo = $this->app['eccube.repository.base_info']->get();
        $this->expected = '[' . $BaseInfo->getShopName() . '] ' . $form['subject'];
        $this->actual = $Message->subject;
        $this->verify();
    }