first commit
This commit is contained in:
54
tests/functional/BugsTest/CartBugsTest.php
Normal file
54
tests/functional/BugsTest/CartBugsTest.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
use KupShop\DevelopmentBundle\Util\Tests\CartTestTrait;
|
||||
|
||||
class CartBugsTest extends DatabaseTestCase
|
||||
{
|
||||
use CartTestTrait;
|
||||
|
||||
public function testCartUpdateAddressesUndefinedTotalPricePay()
|
||||
{
|
||||
$this->createCart();
|
||||
$cart = $this->cart;
|
||||
|
||||
$cart->setDeliveryAndPayment(1, 1);
|
||||
$cart->updateAddresses([
|
||||
'email' => 'prokop@wpj.cz',
|
||||
'name' => 'TEST',
|
||||
'surname' => 'test',
|
||||
'phone' => '123456789',
|
||||
'street' => 'cdsa 12',
|
||||
'city' => '441',
|
||||
'zip' => '54303',
|
||||
'country' => 'CZ',
|
||||
'firm' => '',
|
||||
'ico' => '',
|
||||
'dic' => '',
|
||||
], []);
|
||||
}
|
||||
|
||||
public function test200CartStepsResponse()
|
||||
{
|
||||
$this->createCart();
|
||||
$cart = $this->cart;
|
||||
|
||||
$cart->createFromDB();
|
||||
|
||||
$client = $this->createClient();
|
||||
$client->request('POST', '/kosik/', ['act' => 'add', 's' => 'cart', 'IDproduct' => 1]);
|
||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
|
||||
/* TODO: Tohle je zakomentovany kvuli Smarty bugu. Smarty nejspis dela problem kompilace a spusteni stejny templaty v jednom procesu.
|
||||
$client->request('POST', '/kosik/', ['OrderNext' => 'delivery']);
|
||||
//$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
$client->request('POST', '/kosik/', ['act' => 'recount', 'delivery_id' => 1, 'payment_id' => 1]);
|
||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
|
||||
$client->request('POST', '/kosik/', ['OrderNext' => 'user']);
|
||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
*/
|
||||
// $client->request('POST', '/kosik/dodaci-udaje/?invoice%5Bemail%5D=prokop%40wpj.cz&invoice%5Bname%5D=test&invoice%5Bsurname%5D=test&invoice%5Bphone%5D=773568922&invoice%5Bstreet%5D=Fugnerova+1288&invoice%5Bcity%5D=test&invoice%5Bzip%5D=54303&invoice%5Bcountry%5D=CZ&different_address=0&delivery%5Bname%5D=&delivery%5Bsurname%5D=&delivery%5Bfirm%5D=&delivery%5Bstreet%5D=&delivery%5Bcity%5D=&delivery%5Bzip%5D=&delivery%5Bcountry%5D=CZ&firm_address=0&invoice%5Bfirm%5D=&invoice%5Bico%5D=&invoice%5Bdic%5D=¬eUser=&OrderNext=summary');
|
||||
//
|
||||
// $this->assertTrue($client->getResponse()->isSuccessful());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user