Repository: Sylius/Sylius
Pull request #18003: [PHPSpec to PHPUnit] Customer Component
Author: login: rust-le
Labels: name: DX
description: Issues and PRs aimed at improving Developer eXperience.
name: Maintenance
description: CI configurations, READMEs, releases, etc.
Created: 2025-05-13T07:15:41Z | Merged: 2025-05-13T10:00:10Z

| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | OP-571
| License         | MIT

Rewrite PHPSpec to PHPUnit test in Customer Component

<!--
 - Bug fixes must be submitted against the 1.14 or 2.0 branch
 - Features and deprecations must be submitted against the 2.1 branch
 - Make sure that the correct base branch is set

 To be sure you are not breaking any Backward Compatibilities, check the documentation:
 https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Tests**
  - Replaced the previous testing framework with PHPUnit for the Customer component.
  - Added new PHPUnit test suites for customer and customer group models.
  - Removed legacy PHPSpec tests and configuration files.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Diff:
diff --git a/src/Sylius/Component/Customer/composer.json b/src/Sylius/Component/Customer/composer.json
index 2cb2f8fdcfd..beac4d7d440 100644
--- a/src/Sylius/Component/Customer/composer.json
+++ b/src/Sylius/Component/Customer/composer.json
@@ -36,7 +36,7 @@
         "sylius/resource": "^1.12"
     },
     "require-dev": {
-        "phpspec/phpspec": "^7.5",
+        "phpunit/phpunit": "^10.5",
         "icanhazstring/composer-unused": "^0.8.11"
     },
     "config": {
@@ -59,7 +59,7 @@
     },
     "autoload-dev": {
         "psr-4": {
-            "Sylius\\Component\\Customer\\spec\\": "spec/"
+            "Tests\\Sylius\\Component\\Customer\\": "tests/"
         }
     },
     "repositories": [
diff --git a/src/Sylius/Component/Customer/phpspec.yml.dist b/src/Sylius/Component/Customer/phpspec.yml.dist
deleted file mode 100644
index 3d2a0124d30..00000000000
--- a/src/Sylius/Component/Customer/phpspec.yml.dist
+++ /dev/null
@@ -1,5 +0,0 @@
-suites:
-    main:
-        namespace: Sylius\Component\Customer
-        psr4_prefix: Sylius\Component\Customer
-        src_path: .
diff --git a/src/Sylius/Component/Customer/phpunit.xml.dist b/src/Sylius/Component/Customer/phpunit.xml.dist
new file mode 100644
index 00000000000..737678ad959
--- /dev/null
+++ b/src/Sylius/Component/Customer/phpunit.xml.dist
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
+         colors="true"
+>
+    <php>
+        <ini name="error_reporting" value="-1"/>
+    </php>
+
+    <testsuites>
+        <testsuite name="sylius_customer_component_test_suite">
+            <directory>./tests/</directory>
+        </testsuite>
+    </testsuites>
+</phpunit>
diff --git a/src/Sylius/Component/Customer/spec/Model/CustomerGroupSpec.php b/src/Sylius/Component/Customer/spec/Model/CustomerGroupSpec.php
deleted file mode 100644
index 5f549dbe422..00000000000
--- a/src/Sylius/Component/Customer/spec/Model/CustomerGroupSpec.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-/*
- * This file is part of the Sylius package.
- *
- * (c) Sylius Sp. z o.o.
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-declare(strict_types=1);
-
-namespace spec\Sylius\Component\Customer\Model;
-
-use PhpSpec\ObjectBehavior;
-use Sylius\Component\Customer\Model\CustomerGroupInterface;
-
-final class CustomerGroupSpec extends ObjectBehavior
-{
-    function it_implements_customer_group_interface(): void
-    {
-        $this->shouldImplement(CustomerGroupInterface::class);
-    }
-
-    function it_has_no_name_by_default(): void
-    {
-        $this->getName()->shouldReturn(null);
-    }
-
-    function its_name_is_mutable(): void
-    {
-        $this->setName('Retail');
-        $this->getName()->shouldReturn('Retail');
-    }
-
-    function its_code_is_mutable(): void
-    {
-        $this->setCode('#001');
-        $this->getCode()->shouldReturn('#001');
-    }
-}
diff --git a/src/Sylius/Component/Customer/spec/Model/CustomerSpec.php b/src/Sylius/Component/Customer/spec/Model/CustomerSpec.php
deleted file mode 100644
index e86c2bb3988..00000000000
--- a/src/Sylius/Component/Customer/spec/Model/CustomerSpec.php
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-
-/*
- * This file is part of the Sylius package.
- *
- * (c) Sylius Sp. z o.o.
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-declare(strict_types=1);
-
-namespace spec\Sylius\Component\Customer\Model;
-
-use PhpSpec\ObjectBehavior;
-use Sylius\Component\Customer\Model\CustomerGroupInterface;
-use Sylius\Component\Customer\Model\CustomerInterface;
-
-final class CustomerSpec extends ObjectBehavior
-{
-    function it_implements_customer_interface(): void
-    {
-        $this->shouldImplement(CustomerInterface::class);
-    }
-
-    function it_sets_email(): void
-    {
-        $this->setEmail('customer@email.com');
-
-        $this->getEmail()->shouldReturn('customer@email.com');
-    }
-
-    function it_sets_first_name(): void
-    {
-        $this->setFirstName('Edward');
-
-        $this->getFirstName()->shouldReturn('Edward');
-    }
-
-    function it_sets_last_name(): void
-    {
-        $this->setLastName('Thatch');
-
-        $this->getLastName()->shouldReturn('Thatch');
-    }
-
-    function it_can_get_full_name(): void
-    {
-        $this->setFirstName('Edward');
-        $this->setLastName('Kenway');
-
-        $this->getFullName()->shouldReturn('Edward Kenway');
-    }
-
-    function it_sets_birthday(): void
-    {
-        $birthday = new \DateTime('1987-07-08');
-        $this->setBirthday($birthday);
-
-        $this->getBirthday()->shouldReturn($birthday);
-    }
-
-    function it_sets_gender(): void
-    {
-        $this->setGender(CustomerInterface::FEMALE_GENDER);
-
-        $this->getGender()->shouldReturn(CustomerInterface::FEMALE_GENDER);
-    }
-
-    function it_has_unknown_gender_as_unknown(): void
-    {
-        $this->getGender()->shouldReturn(CustomerInterface::UNKNOWN_GENDER);
-    }
-
-    function it_can_check_if_gender_is_female(): void
-    {
-        $this->setGender(CustomerInterface::FEMALE_GENDER);
-        $this->isFemale()->shouldReturn(true);
-        $this->isMale()->shouldReturn(false);
-    }
-
-    function it_can_check_if_gender_is_male(): void
-    {
-        $this->setGender(CustomerInterface::MALE_GENDER);
-        $this->isFemale()->shouldReturn(false);
-        $this->isMale()->shouldReturn(true);
-    }
-
-    function it_has_no_group_by_default(): void
-    {
-        $this->getGroup()->shouldReturn(null);
-    }
-
-    function its_group_is_mutable(CustomerGroupInterface $group): void
-    {
-        $this->setGroup($group);
-        $this->getGroup()->shouldReturn($group);
-    }
-}
diff --git a/src/Sylius/Component/Customer/tests/Model/CustomerGroupTest.php b/src/Sylius/Component/Customer/tests/Model/CustomerGroupTest.php
new file mode 100644
index 00000000000..4eb812ae706
--- /dev/null
+++ b/src/Sylius/Component/Customer/tests/Model/CustomerGroupTest.php
@@ -0,0 +1,51 @@
+<?php
+
+/*
+ * This file is part of the Sylius package.
+ *
+ * (c) Sylius Sp. z o.o.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace Tests\Sylius\Component\Customer\Model;
+
+use PHPUnit\Framework\TestCase;
+use Sylius\Component\Customer\Model\CustomerGroup;
+use Sylius\Component\Customer\Model\CustomerGroupInterface;
+
+final class CustomerGroupTest extends TestCase
+{
+    private CustomerGroupInterface $customerGroup;
+
+    public function setUp(): void
+    {
+        parent::setUp();
+        $this->customerGroup = new CustomerGroup();
+    }
+
+    public function testShouldImplementsCustomerGroupInterface(): void
+    {
+        $this->assertInstanceOf(CustomerGroupInterface::class, $this->customerGroup);
+    }
+
+    public function testShouldHasNoNameByDefault(): void
+    {
+        self::assertNull($this->customerGroup->getName());
+    }
+
+    public function testNameShouldBeMutable(): void
+    {
+        $this->customerGroup->setName('Retail');
+        self::assertSame('Retail', $this->customerGroup->getName());
+    }
+
+    public function testCodeShouldBeMutable(): void
+    {
+        $this->customerGroup->setCode('#001');
+        self::assertSame('#001', $this->customerGroup->getCode());
+    }
+}
diff --git a/src/Sylius/Component/Customer/tests/Model/CustomerTest.php b/src/Sylius/Component/Customer/tests/Model/CustomerTest.php
new file mode 100644
index 00000000000..c4b86c2e23b
--- /dev/null
+++ b/src/Sylius/Component/Customer/tests/Model/CustomerTest.php
@@ -0,0 +1,104 @@
+<?php
+
+/*
+ * This file is part of the Sylius package.
+ *
+ * (c) Sylius Sp. z o.o.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace Tests\Sylius\Component\Customer\Model;
+
+use PHPUnit\Framework\TestCase;
+use Sylius\Component\Customer\Model\Customer;
+use Sylius\Component\Customer\Model\CustomerGroupInterface;
+use Sylius\Component\Customer\Model\CustomerInterface;
+
+final class CustomerTest extends TestCase
+{
+    private Customer $customer;
+
+    protected function setUp(): void
+    {
+        parent::setUp();
+        $this->customer = new Customer();
+    }
+
+    public function testShouldImplementCustomerInterface(): void
+    {
+        self::assertInstanceOf(CustomerInterface::class, $this->customer);
+    }
+
+    public function testEmailShouldBeMutable(): void
+    {
+        $this->customer->setEmail('customer@email.com');
+        self::assertSame('customer@email.com', $this->customer->getEmail());
+    }
+
+    public function testFirstNameShouldBeMutable(): void
+    {
+        $this->customer->setFirstName('Edward');
+        self::assertSame('Edward', $this->customer->getFirstName());
+    }
+
+    public function testLastNameShouldBeMutable(): void
+    {
+        $this->customer->setLastName('Thatch');
+        self::assertSame('Thatch', $this->customer->getLastName());
+    }
+
+    public function testFullNameShoudBeMutable(): void
+    {
+        $this->customer->setFirstName('Edward');
+        $this->customer->setLastName('Kenway');
+        self::assertSame('Edward Kenway', $this->customer->getFullName());
+    }
+
+    public function testBirthdayShouldBeMutable(): void
+    {
+        $birthday = new \DateTime('1987-07-08');
+        $this->customer->setBirthday($birthday);
+        self::assertSame($birthday, $this->customer->getBirthday());
+    }
+
+    public function testGenderShouldBeMutable(): void
+    {
+        $this->customer->setGender(CustomerInterface::FEMALE_GENDER);
+        self::assertSame(CustomerInterface::FEMALE_GENDER, $this->customer->getGender());
+    }
+
+    public function testGenderShouldBeUnknownByDefault(): void
+    {
+        self::assertSame(CustomerInterface::UNKNOWN_GENDER, $this->customer->getGender());
+    }
+
+    public function testIsFemaleGender(): void
+    {
+        $this->customer->setGender(CustomerInterface::FEMALE_GENDER);
+        self::assertTrue($this->customer->isFemale());
+        self::assertFalse($this->customer->isMale());
+    }
+
+    public function testIsMaleGender(): void
+    {
+        $this->customer->setGender(CustomerInterface::MALE_GENDER);
+        self::assertFalse($this->customer->isFemale());
+        self::assertTrue($this->customer->isMale());
+    }
+
+    public function testShouldHasNoGroupByDefault(): void
+    {
+        self::assertNull($this->customer->getGroup());
+    }
+
+    public function testGroupShouldBeMutable(): void
+    {
+        $group = $this->createMock(CustomerGroupInterface::class);
+        $this->customer->setGroup($group);
+        self::assertSame($group, $this->customer->getGroup());
+    }
+}


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 1**

<details>
<summary>🧹 Nitpick comments (4)</summary><blockquote>

<details>
<summary>src/Sylius/Component/Customer/Tests/Model/CustomerGroupTest.php (1)</summary><blockquote>

`31-38`: **Standardize assertion style**

There's inconsistent use of static vs. instance assertion methods. Line 32 uses `$this->assertInstanceOf()` while line 37 uses `self::assertNull()`.

Consider standardizing on either static (`self::assert*`) or instance (`$this->assert*`) method calls throughout the class for consistency.

</blockquote></details>
<details>
<summary>src/Sylius/Component/Customer/Tests/Model/CustomerTest.php (3)</summary><blockquote>

`54-54`: **Fix typo in test method name**

There's a typo in the method name: "testFullNameShoudBeMutable" is missing an 'l' in "Should".

```diff
-    public function testFullNameShoudBeMutable(): void
+    public function testFullNameShouldBeMutable(): void
```

---

`32-96`: **Standardize assertion style**

There's inconsistent use of static vs. instance assertion methods throughout the file. For example, line 33 uses `self::assertInstanceOf()` while some other assertions use `$this->assert*`.

Consider standardizing on either static (`self::assert*`) or instance (`$this->assert*`) method calls throughout the class for consistency.

---

`79-91`: **Consider more focused gender test methods**

The gender tests check multiple assertions in each test method. Consider separating them for more focused tests that validate a single concept.

For example:
```diff
-    public function testIsFemaleGender(): void
+    public function testIsFemaleGenderWhenGenderIsFemale(): void
     {
         $this->customer->setGender(CustomerInterface::FEMALE_GENDER);
         self::assertTrue($this->customer->isFemale());
+    }
+    
+    public function testIsMaleGenderWhenGenderIsFemale(): void
+    {
+        $this->customer->setGender(CustomerInterface::FEMALE_GENDER);
         self::assertFalse($this->customer->isMale());
     }
```

This makes tests more focused and failure messages more specific about what exactly failed.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 8d73365f6c81f641f49164309a0e2e243d4b05db and d730112c790dfd474f7afe973e3964ec5fdc4a8a.

</details>

<details>
<summary>📒 Files selected for processing (7)</summary>

* `src/Sylius/Component/Customer/Tests/Model/CustomerGroupTest.php` (1 hunks)
* `src/Sylius/Component/Customer/Tests/Model/CustomerTest.php` (1 hunks)
* `src/Sylius/Component/Customer/composer.json` (2 hunks)
* `src/Sylius/Component/Customer/phpspec.yml.dist` (0 hunks)
* `src/Sylius/Component/Customer/phpunit.xml.dist` (1 hunks)
* `src/Sylius/Component/Customer/spec/Model/CustomerGroupSpec.php` (0 hunks)
* `src/Sylius/Component/Customer/spec/Model/CustomerSpec.php` (0 hunks)

</details>

<details>
<summary>💤 Files with no reviewable changes (3)</summary>

* src/Sylius/Component/Customer/phpspec.yml.dist
* src/Sylius/Component/Customer/spec/Model/CustomerGroupSpec.php
* src/Sylius/Component/Customer/spec/Model/CustomerSpec.php

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🧬 Code Graph Analysis (1)</summary>

<details>
<summary>src/Sylius/Component/Customer/Tests/Model/CustomerTest.php (1)</summary><blockquote>

<details>
<summary>src/Sylius/Component/Core/Model/Customer.php (1)</summary>

* `Customer` (22-116)

</details>

</blockquote></details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (15)</summary>

* GitHub Check: Frontend / NodeJS 20.x
* GitHub Check: End-to-end tests (MySQL) / JS with Panther, PHP 8.3, Symfony ^7.2 (test_cached), MySQL 8.4, Twig ^3.3
* GitHub Check: End-to-end tests (MySQL) / Non-JS, PHP 8.3, Symfony ^7.2 (test_cached), MySQL 8.4, Twig ^3.3
* GitHub Check: End-to-end tests (MySQL) / JS with Panther, PHP 8.2, Symfony ^6.4 (test_cached), MySQL 8.0, Twig ^3.3
* GitHub Check: End-to-end tests (MySQL) / JS with Chromedriver, PHP 8.3, Symfony ^7.2 (test_cached), MySQL 8.4, Twig ^3.3
* GitHub Check: End-to-end tests (MySQL) / JS with Chromedriver, PHP 8.2, Symfony ^6.4 (test_cached), MySQL 8.0, Twig ^3.3
* GitHub Check: End-to-end tests (MySQL) / Non-JS, PHP 8.2, Symfony ^6.4 (test_cached), MySQL 8.0, Twig ^3.3
* GitHub Check: End-to-end tests (PostgreSQL) / Non-JS, PHP 8.2, Symfony ^6.4, PostgreSQL 15.8
* GitHub Check: End-to-end tests (PostgreSQL) / Non-JS, PHP 8.3, Symfony ^7.2, PostgreSQL 16.4
* GitHub Check: End-to-end tests (MariaDB) / Non-JS, PHP 8.3, Symfony ^7.2, MariaDB 11.4.3, State Machine Adapter symfony_workflow
* GitHub Check: End-to-end tests (MariaDB) / Non-JS, PHP 8.3, Symfony ^7.2, MariaDB 11.4.3, State Machine Adapter winzou_state_machine
* GitHub Check: End-to-end tests (MariaDB) / Non-JS, PHP 8.2, Symfony ^6.4, MariaDB 10.11.9, State Machine Adapter symfony_workflow
* GitHub Check: Packages / PHP 8.3, Symfony ^7.2
* GitHub Check: Packages / PHP 8.2, Symfony ^6.4
* GitHub Check: WIP

</details>

<details>
<summary>🔇 Additional comments (3)</summary><blockquote>

<details>
<summary>src/Sylius/Component/Customer/phpunit.xml.dist (1)</summary>

`1-16`: **Configuration looks good**

The PHPUnit configuration is correctly set up with appropriate XML schema, error reporting, and test suite definition.


You might consider adding additional useful PHPUnit configurations like:
- `failOnWarning="true"`
- `failOnRisky="true"` 
- Coverage reporting settings

These are optional but can enhance your test configuration.

</details>
<details>
<summary>src/Sylius/Component/Customer/Tests/Model/CustomerGroupTest.php (1)</summary>

`1-51`: **Test coverage looks good**

The test class properly validates the CustomerGroup model's behavior, including interface implementation, default values, and property mutability.

</details>
<details>
<summary>src/Sylius/Component/Customer/Tests/Model/CustomerTest.php (1)</summary>

`1-104`: **Test coverage looks good**

The test class appropriately validates the Customer model's properties and behaviors. All basic functionality is covered including email, name properties, gender functionality, and group association.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-13T07:19:16Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 0**

<details>
<summary>🧹 Nitpick comments (5)</summary><blockquote>

<details>
<summary>src/Sylius/Component/Customer/tests/Model/CustomerGroupTest.php (2)</summary><blockquote>

`20-51`: **Method naming and assertion style improvements**

There are a few minor grammatical issues in your test method names:

1. Line 30: `testShouldImplementsCustomerGroupInterface` should be `testShouldImplementCustomerGroupInterface` (grammar)
2. Line 35: `testShouldHasNoNameByDefault` should be `testShouldHaveNoNameByDefault` (grammar)

Also, there's inconsistent use of assertion styles throughout the test class. Sometimes you use `self::assert*` (lines 37, 43, 49) and other times `$this->assert*` (line 32). For consistency, it's better to stick with one style throughout the codebase.


```diff
-    public function testShouldImplementsCustomerGroupInterface(): void
+    public function testShouldImplementCustomerGroupInterface(): void
     {
-        $this->assertInstanceOf(CustomerGroupInterface::class, $this->customerGroup);
+        self::assertInstanceOf(CustomerGroupInterface::class, $this->customerGroup);
     }

-    public function testShouldHasNoNameByDefault(): void
+    public function testShouldHaveNoNameByDefault(): void
     {
         self::assertNull($this->customerGroup->getName());
     }
```

---

`24-28`: **Consider using protected visibility for setUp method**

The standard visibility for PHPUnit's setUp method is `protected`. While `public` works correctly, using `protected` would align better with PHPUnit conventions.


```diff
-    public function setUp(): void
+    protected function setUp(): void
     {
         parent::setUp();
         $this->customerGroup = new CustomerGroup();
     }
```

</blockquote></details>
<details>
<summary>src/Sylius/Component/Customer/tests/Model/CustomerTest.php (3)</summary><blockquote>

`54-59`: **Fix typo in method name**

There's a typo in the method name - "Shoud" should be "Should".


```diff
-    public function testFullNameShoudBeMutable(): void
+    public function testFullNameShouldBeMutable(): void
     {
         $this->customer->setFirstName('Edward');
         $this->customer->setLastName('Kenway');
         self::assertSame('Edward Kenway', $this->customer->getFullName());
     }
```

---

`93-96`: **Fix grammatical error in method name**

The method name has a grammatical error - "has" should be "have".


```diff
-    public function testShouldHasNoGroupByDefault(): void
+    public function testShouldHaveNoGroupByDefault(): void
     {
         self::assertNull($this->customer->getGroup());
     }
```

---

`31-34`: **Consistent assertion style**

There's an inconsistency in assertion style between methods. In some places, you use `self::assert*` (which is good and predominant in this class), but line 33 uses `$this->assert*`. For consistency, stick with one style (preferably `self::assert*` since that's used most frequently).


```diff
    public function testShouldImplementCustomerInterface(): void
    {
-        self::assertInstanceOf(CustomerInterface::class, $this->customer);
+        $this->assertInstanceOf(CustomerInterface::class, $this->customer);
    }
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between cf2ee53fdf930173dbcfc82f6b94a14a9462cd78 and fddcc88e1f3284e394a583257a2becb0f7525168.

</details>

<details>
<summary>📒 Files selected for processing (4)</summary>

* `src/Sylius/Component/Customer/composer.json` (2 hunks)
* `src/Sylius/Component/Customer/phpunit.xml.dist` (1 hunks)
* `src/Sylius/Component/Customer/tests/Model/CustomerGroupTest.php` (1 hunks)
* `src/Sylius/Component/Customer/tests/Model/CustomerTest.php` (1 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (2)</summary>

* src/Sylius/Component/Customer/composer.json
* src/Sylius/Component/Customer/phpunit.xml.dist

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (15)</summary>

* GitHub Check: End-to-end tests (MariaDB) / Non-JS, PHP 8.2, Symfony ^6.4, MariaDB 10.11.9, State Machine Adapter symfony_workflow
* GitHub Check: End-to-end tests (MariaDB) / Non-JS, PHP 8.3, Symfony ^7.2, MariaDB 11.4.3, State Machine Adapter winzou_state_machine
* GitHub Check: End-to-end tests (MariaDB) / Non-JS, PHP 8.3, Symfony ^7.2, MariaDB 11.4.3, State Machine Adapter symfony_workflow
* GitHub Check: Frontend / NodeJS 20.x
* GitHub Check: Packages / PHP 8.3, Symfony ^7.2
* GitHub Check: Packages / PHP 8.2, Symfony ^6.4
* GitHub Check: End-to-end tests (PostgreSQL) / Non-JS, PHP 8.2, Symfony ^6.4, PostgreSQL 15.8
* GitHub Check: End-to-end tests (PostgreSQL) / Non-JS, PHP 8.3, Symfony ^7.2, PostgreSQL 16.4
* GitHub Check: End-to-end tests (MySQL) / JS with Panther, PHP 8.2, Symfony ^6.4 (test_cached), MySQL 8.0, Twig ^3.3
* GitHub Check: End-to-end tests (MySQL) / JS with Panther, PHP 8.3, Symfony ^7.2 (test_cached), MySQL 8.4, Twig ^3.3
* GitHub Check: End-to-end tests (MySQL) / JS with Chromedriver, PHP 8.3, Symfony ^7.2 (test_cached), MySQL 8.4, Twig ^3.3
* GitHub Check: End-to-end tests (MySQL) / JS with Chromedriver, PHP 8.2, Symfony ^6.4 (test_cached), MySQL 8.0, Twig ^3.3
* GitHub Check: End-to-end tests (MySQL) / Non-JS, PHP 8.2, Symfony ^6.4 (test_cached), MySQL 8.0, Twig ^3.3
* GitHub Check: End-to-end tests (MySQL) / Non-JS, PHP 8.3, Symfony ^7.2 (test_cached), MySQL 8.4, Twig ^3.3
* GitHub Check: WIP

</details>

<details>
<summary>🔇 Additional comments (1)</summary><blockquote>

<details>
<summary>src/Sylius/Component/Customer/tests/Model/CustomerTest.php (1)</summary>

`1-105`: **Good job migrating from PHPSpec to PHPUnit**

The overall conversion from PHPSpec to PHPUnit looks well-executed. The test coverage seems appropriate, and you've maintained the same behavior validation as was likely present in the original PHPSpec tests.

Consider adding tests for additional methods that might exist in the Customer class but aren't covered here (like canonical email handling, phone number, or other properties) if they were tested in the original PHPSpec tests.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-05-13T08:25:00Z
user: login: GSadee
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-13T10:00:03Z

Review comments:
diff_hunk: @@ -59,7 +59,7 @@
     },
     "autoload-dev": {
         "psr-4": {
-            "Sylius\\Component\\Customer\\spec\\": "spec/"
+            "Tests\\Sylius\\Component\\Customer": "Tests/"
path: src/Sylius/Component/Customer/composer.json
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Fix missing trailing backslash in PSR-4 namespace definition**

The PSR-4 autoload namespace definition should end with a backslash when it maps to a directory. Without it, the autoloader will look for classes in the wrong namespace.

```diff
-            "Tests\\Sylius\\Component\\Customer": "Tests/"
+            "Tests\\Sylius\\Component\\Customer\\": "Tests/"
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
            "Tests\\Sylius\\Component\\Customer\\": "Tests/"
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->

✅ Addressed in commit cf2ee53
created_at: 2025-05-13T07:19:15Z
author_association: NONE
diff_hunk: @@ -0,0 +1,51 @@
+<?php
+
+/*
+ * This file is part of the Sylius package.
+ *
+ * (c) Sylius Sp. z o.o.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace Tests\Sylius\Component\Customer\Model;
+
+use PHPUnit\Framework\TestCase;
+use Sylius\Component\Customer\Model\CustomerGroup;
+use Sylius\Component\Customer\Model\CustomerGroupInterface;
+
+final class CustomerGroupTest extends TestCase
+{
+    private CustomerGroupInterface $customerGroup;
+
+    public function setUp(): void
+    {
+        parent::setUp();
+        $this->customerGroup = new CustomerGroup();
+    }
+
+    public function testShouldImplementsCustomerGroupInterface(): void
path: src/Sylius/Component/Customer/tests/Model/CustomerGroupTest.php
user: login: GSadee
body: ```suggestion
    public function testImplementsCustomerGroupInterface(): void
```
created_at: 2025-05-13T09:59:14Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,51 @@
+<?php
+
+/*
+ * This file is part of the Sylius package.
+ *
+ * (c) Sylius Sp. z o.o.
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace Tests\Sylius\Component\Customer\Model;
+
+use PHPUnit\Framework\TestCase;
+use Sylius\Component\Customer\Model\CustomerGroup;
+use Sylius\Component\Customer\Model\CustomerGroupInterface;
+
+final class CustomerGroupTest extends TestCase
+{
+    private CustomerGroupInterface $customerGroup;
+
+    public function setUp(): void
+    {
+        parent::setUp();
+        $this->customerGroup = new CustomerGroup();
+    }
+
+    public function testShouldImplementsCustomerGroupInterface(): void
+    {
+        $this->assertInstanceOf(CustomerGroupInterface::class, $this->customerGroup);
+    }
+
+    public function testShouldHasNoNameByDefault(): void
path: src/Sylius/Component/Customer/tests/Model/CustomerGroupTest.php
user: login: GSadee
body: ```suggestion
    public function testHasNoNameByDefault(): void
```
created_at: 2025-05-13T09:59:24Z
author_association: MEMBER

PR comments:
user: login: coderabbitai[bot]
created_at: 2025-05-13T07:15:48Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough

The changes switch the testing framework for the Customer component from PHPSpec to PHPUnit. PHPSpec configuration and specs are removed, PHPUnit configuration and equivalent tests are added, and the autoload-dev namespace is updated to reflect the new test directory and namespace structure.

## Changes

| Files/Group                                                                 | Change Summary                                                                                                 |
|-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|
| `src/Sylius/Component/Customer/composer.json`                               | Updated dev dependencies to use PHPUnit instead of PHPSpec; changed autoload-dev PSR-4 mapping for tests.     |
| `src/Sylius/Component/Customer/phpspec.yml.dist`<br>`spec/Model/*.php`      | Removed PHPSpec configuration and specification files for `Customer` and `CustomerGroup` models.              |
| `src/Sylius/Component/Customer/phpunit.xml.dist`                            | Added PHPUnit configuration file for the Customer component.                                                  |
| `src/Sylius/Component/Customer/tests/Model/CustomerTest.php`<br>`CustomerGroupTest.php` | Added PHPUnit test classes for `Customer` and `CustomerGroup` models, covering interface and property tests.  |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant PHPUnit
    participant CustomerTest
    participant Customer
    participant CustomerGroupTest
    participant CustomerGroup

    PHPUnit->>CustomerTest: Run test methods
    CustomerTest->>Customer: Instantiate and set properties
    CustomerTest-->>PHPUnit: Assert property values and interface
    PHPUnit->>CustomerGroupTest: Run test methods
    CustomerGroupTest->>CustomerGroup: Instantiate and set properties
    CustomerGroupTest-->>PHPUnit: Assert property values and interface
```

## Possibly related PRs

- [Sylius/Sylius#17835](https://github.com/Sylius/Sylius/pull/17835): Documents the architectural decision to migrate from PHPSpec to PHPUnit, directly related to this implementation PR.
- [Sylius/Sylius#17836](https://github.com/Sylius/Sylius/pull/17836): Improves ADR documentation for the PHPSpec to PHPUnit migration, complementing this code-level migration.
- [Sylius/Sylius#17957](https://github.com/Sylius/Sylius/pull/17957): Performs a similar PHPSpec to PHPUnit migration for the Currency component, analogous to the changes here.

## Suggested labels

`DX`, `Maintenance`

## Suggested reviewers

- GSadee

## Poem

> A rabbit hopped through code with glee,  
> Swapping specs for PHPUnit, as quick as can be.  
> Old configs retired, new tests in their place,  
> Namespaces aligned, a neat tidy space.  
> With every assert, the garden grows bright—  
> Customer models tested, all through the night!  
> 🐇✨

<!-- walkthrough_end -->

<!-- announcements_start -->

> [!TIP]
> <details>
> <summary>⚡️ Faster reviews with caching</summary>
> 
> - CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure `Review - Disable Cache` at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the `Data Retention` setting under your Organization Settings.
> 
> Enjoy the performance boost—your workflow just got faster.
> 
> </details>

<!-- announcements_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNxU3bABsvkCiQBHbGlcABpIcVwvOkgAIgBtAHUASSsAXXirAAkrAGVuUQj8axyAVQx1NMgAYWxEAjY+apZufHIMMNjIAHc0ZAcBZnUaejkI2BJIOso/OtwwaPRkTx8/QOD6yAxHARmARgAOAAYjgGZ+LFwJyFzZL3g6yABxdSzsATXWxHV8Fw0Ya62CLOUi4ZBXSYAJg0e0gAioGAYsHQGHoqAw+FwKA6ZCU9D66Dh2CIkAAZvAAB7hcjdMkkajYfzhARoBgAa16FHoTGY3Go8DU91w8nh9LZ4V+kCUvFE/La/2SWP8Xmo0iK40m4nZJCxAHkrGAAKwAdlhmDRyHuDDIiBi2FRMwhkAAssloJArTaSBo3NdmNosJ4KF9JvhSeNUEDUAQ1t0KOpNdcSBSkOIMCSaPVkKTJU7avUWDNmry2uwyRQWCU8gUGOrslZyup/u5kEjMKR0PciBhkN11Minbx8CIxABycEheDp8toNjdX5snj+UmUMjW5CS+rm5y0RDN65KRAMePccRtbEMLzYQ+E/xDB18FT4PBwhFI4EUUFTkk5vgCYlkpS0jhCuDL+Ig4TmlKJAygwco9pBvYkKsBJoB6U6LjGTq3PcjwsuynLci0/KCuo8hDkMtpSvgDCOOw8HqjajKTBicKshyO4KLyJHwEK8hIA4arOEgkykhWzARq2sD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hAACisiXg85fZA5Q5JA3N65vNIZiMRVYeuAXZJAIttAi54tktY5fN9QeKalitytqty5Etq5o5TZMtIQRVNeutMZKtYtBt6tJti0iMFZWlCeetNtqmdt0tDtIQDeD4rtS57tRtPN45iMPtVkrt5Qi++Ay+VZNZSJHtwdIQyQiAJVM+odlA8dmtuASd1V0QadFAGdpt9QytJZiAo8AOMdJB4mBdXt9QAOftatgdUtm5Dk8USksqgx6kLhvkLA/kXAVAwU+6YUYwD81kagMUOg8kTkuk6ghqAZiAxqzuLydA4aG+Hc9khgBgU9tAxopwRwewewkIDAxoAAnEcLQKSLQLTMaLTKSMaKfCQMfTvSQKcMfQAGy0yiCGgX0MC0xoAHBoST2KSMCkiQjgqGinAX2kjH2717A720ACAMCkgMAHCQikiv0CDH2/17C/2YOv2H3b0HDr2b1AMX20BFIHAHAkB7CkinCQgHAf0v2/2GgHC0MmhoCQi7AMACBHC32GiQiGh7Cv2ENxRT1+Qz1z0L20pL20CGrKT6BAA= -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=Sylius/Sylius&utm_content=18003):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: NONE
user: login: github-actions[bot]
created_at: 2025-05-13T07:24:44Z
body: ### :x: Preview Environment deleted from [Bunnyshell](https://www.bunnyshell.com)

Available commands:
  - :rocket: `/bns:deploy` to redeploy the environment
<!-- thollander/actions-comment-pull-request "bunnyshell-preview-env" -->
author_association: NONE
user: login: GSadee
created_at: 2025-05-13T10:00:21Z
body: Thank you @rust-le! 🎉 
author_association: MEMBER