This repository was archived by the owner on Oct 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1313use Commercetools \Core \Model \CustomerGroup \CustomerGroupReference ;
1414use Commercetools \Core \Model \Common \AddressCollection ;
1515use Commercetools \Core \Model \CustomField \CustomFieldObjectDraft ;
16+ use Commercetools \Core \Model \Common \DateDecorator ;
1617
1718/**
1819 * @package Commercetools\Core\Model\Customer
3536 * @method CustomerDraft setPassword(string $password = null)
3637 * @method CustomerDraft setAnonymousCartId(string $anonymousCartId = null)
3738 * @method CustomerDraft setExternalId(string $externalId = null)
38- * @method DateTimeDecorator getDateOfBirth()
39+ * @method DateDecorator getDateOfBirth()
3940 * @method CustomerDraft setDateOfBirth(\DateTime $dateOfBirth = null)
4041 * @method string getCompanyName()
4142 * @method CustomerDraft setCompanyName(string $companyName = null)
Original file line number Diff line number Diff line change @@ -491,6 +491,7 @@ public function testCompanyName()
491491 public function testDateOfBirth ()
492492 {
493493 $ draft = $ this ->getDraft ('date-of-birth ' );
494+ $ draft ->setDateOfBirth (new \DateTime ('yesterday ' ));
494495 $ customer = $ this ->createCustomer ($ draft );
495496
496497 $ timezone = date_default_timezone_get ();
Original file line number Diff line number Diff line change @@ -21,4 +21,12 @@ public function testFromArray()
2121 )
2222 );
2323 }
24+
25+ public function testDateOfBirth ()
26+ {
27+ $ draft = CustomerDraft::of ();
28+ $ draft ->setDateOfBirth (new \DateTime ('2015-10-15 10:00 ' ));
29+ $ this ->assertJsonStringEqualsJsonString ('{"dateOfBirth": "2015-10-15"} ' , json_encode ($ draft ));
30+
31+ }
2432}
You can’t perform that action at this time.
0 commit comments