modify travis script

This commit is contained in:
Manuel Raynaud
2013-09-04 08:30:24 +02:00
parent deee59244d
commit 0b9e2552ed
3 changed files with 35 additions and 2 deletions

View File

@@ -12,3 +12,4 @@ before_script:
- composer install --prefer-dist --dev
- sh -c "mysql -u$DB_USER -e 'SET FOREIGN_KEY_CHECKS = 0; DROP DATABASE IF EXISTS thelia;SET FOREIGN_KEY_CHECKS = 1;'; fi"
- php Thelia thelia:install --db_host=localhost --db_username=$DB_USER --db_name=thelia
- php install/faker.php

View File

@@ -63,6 +63,8 @@ class Address extends BaseAction implements EventSubscriberInterface
->setCompany($event->getCompany())
->save()
;
$event->setAddress($addressModel);
}
/**

View File

@@ -23,6 +23,7 @@
namespace Thelia\Core\Event;
use Symfony\Component\EventDispatcher\Event;
use Thelia\Model\Address;
use Thelia\Model\Customer;
@@ -103,7 +104,12 @@ class AddressCreateOrUpdateEvent extends Event
*/
protected $customer;
function __construct($label, $title, $firstname, $lastname, $address1, $address2, $address3, $zipcode, $city, $country, $cellphone, $phone, $company, Customer $customer)
/**
* @var \Thelia\Model\Address
*/
protected $address;
function __construct($label, $title, $firstname, $lastname, $address1, $address2, $address3, $zipcode, $city, $country, $cellphone, $phone, $company)
{
$this->address1 = $address1;
$this->address2 = $address2;
@@ -118,7 +124,6 @@ class AddressCreateOrUpdateEvent extends Event
$this->phone = $phone;
$this->title = $title;
$this->zipcode = $zipcode;
$this->customer = $customer;
}
/**
@@ -225,6 +230,14 @@ class AddressCreateOrUpdateEvent extends Event
return $this->zipcode;
}
/**
* @param \Thelia\Model\Customer $customer
*/
public function setCustomer(Customer $customer)
{
$this->customer = $customer;
}
/**
* @return \Thelia\Model\Customer
*/
@@ -233,4 +246,21 @@ class AddressCreateOrUpdateEvent extends Event
return $this->customer;
}
/**
* @param \Thelia\Model\Address $address
*/
public function setAddress(Address $address)
{
$this->address = $address;
}
/**
* @return \Thelia\Model\Address
*/
public function getAddress()
{
return $this->address;
}
}