Commit graph

38819 commits

Author SHA1 Message Date
Grzegorz Sadowski
cbc06a1866
[Statistics][Behat] Adjust scenarios to changed periods 2025-05-15 12:24:28 +02:00
Grzegorz Sadowski
bed5c1e308
[Statistics] Improve names and keys for paid orders count 2025-05-15 12:24:28 +02:00
Grzegorz Sadowski
4a74eb1953
[Statistics][API] Adjust contract tests 2025-05-15 12:24:28 +02:00
Grzegorz Sadowski
0ff9e9f5b4
[Statistics] Fix static analysis 2025-05-15 12:24:27 +02:00
Grzegorz Sadowski
3536b14a35
[Statistics] Implement paid orders count 2025-05-15 12:24:27 +02:00
Grzegorz Sadowski
5a528f476d
[Admin] Change periods in dashboard chart 2025-05-15 12:24:27 +02:00
Bartłomiej Sęk
4d1856850f
Change chart type to line,
add another chart dataset
2025-05-15 12:24:27 +02:00
Grzegorz Sadowski
8b4fb50c67
[PHPSpec to PHPUnit] Promotion Component (#18023)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | OP-571
| License         | MIT

Transformed tests from Component/Promotion from PHPSpec to PHPUnit.

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

## Summary by CodeRabbit

- **Chores**
- Updated dependencies and test configuration for improved compatibility
and testing standards.

- **Tests**
- Migrated all behavioral and model tests from the previous framework to
PHPUnit.
- Added comprehensive new test suites for all major components,
including promotion application, eligibility checking, coupon
generation, and model behaviors.
  - Improved test coverage and reliability across the promotion system.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-15 12:21:22 +02:00
Grzegorz Sadowski
2dafa9c21c
[ShippingBundle] Replace PHPSpec with PHPUnit tests (#18007)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations? | no<!-- don't forget to update the UPGRADE-*.md file
-->
| Related tickets | partially #17837 
| License         | MIT

<!--
 - 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**
- Migrated test suite from PhpSpec to PHPUnit for improved compatibility
and maintenance.
- Added new PHPUnit tests for shipping date assignment, shipping method
configuration groups, calculator existence, and rule validation.
- Updated namespaces and directory structures in test files for
consistency.
  - Removed legacy PhpSpec test files and configuration.

- **Chores**
- Updated test autoloading configuration and excluded additional test
paths from static analysis.
- Adjusted test directory references in configuration files for case
consistency.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-15 11:43:03 +02:00
Grzegorz Sadowski
7589f8e7cc
[UiBundle] Replace PHPSpec with PHPUnit tests (#18000)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations? | no<!-- don't forget to update the UPGRADE-*.md file
-->
| Related tickets | partially #17837 
| License         | MIT

<!--
 - 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

- **Chores**
- Updated static analysis and test configuration files to improve
consistency and directory structure.
- Removed a development dependency and obsolete configuration for a
testing tool.
  - Added PSR-4 autoloading for development test classes.

- **Tests**
  - Migrated from PhpSpec to PHPUnit for testing.
- Added new PHPUnit test classes for controller, Twig extension, error
renderer, and component template finder functionalities.
  - Improved namespace alignment and autoloading for test classes.
  - Removed legacy PhpSpec test files and related fixtures.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-15 11:42:55 +02:00
Grzegorz Sadowski
f5213feb0a
[PHPSpec to PHPUnit] Locale Component (#18028)
| 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 Locale Component using
rector/cusotm-phpspec-to-phpunit

<!--
 - 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

- **Chores**
- Updated dependencies and autoloading configuration for the Locale
component.
  - Removed PhpSpec configuration and legacy spec files.
  - Added PHPUnit configuration for improved test management.

- **Tests**
  - Migrated all Locale component tests from PhpSpec to PHPUnit.
- Introduced comprehensive PHPUnit test classes for context, converter,
model, and provider functionalities to ensure continued reliability and
coverage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-15 11:42:07 +02:00
Mateusz
f9a6517a38 Revert unwanted changes 2025-05-15 11:31:29 +02:00
Mateusz
9e7d9faf1c Add dependency 2025-05-15 11:31:29 +02:00
Mateusz
b6430e3be3 Add dev dependency 2025-05-15 11:31:29 +02:00
Mateusz
ea8277aede Fixed PHPStan and PHPUnit errors 2025-05-15 11:31:29 +02:00
Mateusz
4b737498cd PHPStan clean pass 2025-05-15 11:31:29 +02:00
Mateusz
620b11a89f PHPUnit test after rector transformation 2025-05-15 11:31:29 +02:00
Mateusz
01006ddd1a After rector action 2025-05-15 11:31:29 +02:00
Mateusz
c0e31e4843 Add non-test files 2025-05-15 11:31:29 +02:00
Grzegorz Sadowski
093c37505c
[PHPSpec to PHPUnit] Inventory Component (#18021)
| 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 in Inventory 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

- **Chores**
- Switched the testing framework from PhpSpec to PHPUnit and updated
related configuration files.
	- Reorganized test directories and namespaces for improved structure.

- **Tests**
- Added new PHPUnit tests for inventory availability checking and
inventory unit behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-15 11:07:59 +02:00
Grzegorz Sadowski
18d8e87a5d
[UiBundle] Minor improvement in PHPUnit tests after code review 2025-05-15 10:48:36 +02:00
Grzegorz Sadowski
eb03e8900c
Exclude bundle tests directory from phpstan 2025-05-15 10:48:06 +02:00
Grzegorz Sadowski
6a5bbcd364
[UiBundle] Replace PHPSpec with PHPUnit tests 2025-05-15 10:48:06 +02:00
Grzegorz Sadowski
da1d3f7364
[PHPSpec to PHPUnit] Component Product (#17951)
| Q               | A
|-----------------|-----
| Branch?         | 2.1 <!-- see the comment below -->
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations? | no <!-- don't forget to update the UPGRADE-*.md file
-->
| Related tickets |
| License         | MIT

Transformed tests from Component/Product from PHPSpec to PHPUnit.


<!--
 - 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**
  - Migrated the test suite from PhpSpec to PHPUnit.
  - Removed all legacy PhpSpec tests and configuration files.
- Added comprehensive PHPUnit tests for product factories, generators,
models, resolvers, and utility components.
- Improved test coverage for product behaviors, option handling, variant
generation, and slug creation.

- **Chores**
- Updated development dependencies and autoloading configuration to
support PHPUnit and the new test directory structure.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-15 10:34:48 +02:00
Grzegorz Sadowski
9222f6a3e9
[PHPSpec to PHPUnit] Review Component (#18011)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | OP-571
| License         | MIT

Rewrite PHPSpec tests to PHPUnit
<!--
 - 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**
- Migrated the testing framework from PHPSpec to PHPUnit for the Review
component.
- Added new PHPUnit test suites for core classes, including tests for
average rating calculation, review and reviewer models, and the review
factory.
  - Removed legacy PHPSpec tests and configuration files.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-15 10:05:05 +02:00
Grzegorz Sadowski
17db0b4fa4
[AddressingBundle] Replace PHPSpec with PHPUnit tests (#17977)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | 
| Related tickets | partially #17837 
| License         | MIT

<!--
 - 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**
- Migrated from PhpSpec to PHPUnit for all test coverage in the
AddressingBundle.
- Added new PHPUnit test classes for form subscribers, event listeners,
Twig extensions, and all custom validators.
- Improved test coverage and structure with updated namespaces and type
annotations.
- **Chores**
  - Removed PhpSpec configuration and related dependencies.
- Updated static analysis and configuration files to align with new test
directory structure and naming conventions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-15 09:41:04 +02:00
Grzegorz Sadowski
5ca69edeab
[PHPSpec to PHPUnit] Attribute Component Fix (#18013)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | OP-571
| License         | MIT

Fix to  [PHPSpec to PHPUnit] Attribute Component #17984 

<!--
 - 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

- **Style**
- Reformatted test code for improved readability by consolidating
multi-line mock method calls into single lines.
  - Removed unused mock variables in several test methods.
- **Tests**
  - Corrected typos in test method names to improve clarity.
- Updated method visibility and introduced shared setup in one test
class for consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-15 08:59:17 +02:00
Grzegorz Sadowski
f2130ea7f1
[PHPSpec to PHPUnit] Customer Component Fix (#18012)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | OP-571
| License         | MIT

This is a fix to [PHPSpec to PHPUnit] Customer Component #18003 -Fixing
function names

<!--
 - 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**
- Improved clarity and consistency of test method names for customer and
customer group tests. No changes to test behavior or results.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-15 08:57:45 +02:00
Grzegorz Sadowski
1f2dd797e8
[Currency][Customer][Taxonomy] Remove PHPSpec dependency and configuration from bundles where it was not used (#17981)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | partially #17837 
| License         | MIT

<!--
 - 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

- **Chores**
- Removed PHPSpec-related configuration files and dependencies from
multiple bundles.
- Updated test autoloading and namespace structure for improved
consistency.
- Adjusted static analysis and test discovery settings to include
additional test directories and exclude certain test paths.

- **Refactor**
- Renamed test namespaces and updated related import statements for
better alignment with new directory structure.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-15 08:56:12 +02:00
Grzegorz Sadowski
091db77b1e
[InventoryBundle] Replace PHPSpec with PHPUnit tests (#17983)
| Q               | A
|-----------------|-----
| Branch?         | 2,1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations? | no<!-- don't forget to update the UPGRADE-*.md file
-->
| Related tickets | partially #17837 
| License         | MIT

<!--
 - 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 PhpSpec-based tests with PHPUnit-based tests for inventory
validation constraints and validators.
- Updated test configuration to include both legacy and new test
directories.
- **Chores**
  - Removed PhpSpec configuration and related development dependencies.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-15 08:55:40 +02:00
Grzegorz Sadowski
cf9923487f
[TaxationBundle] Replace PHPSpec with PHPUnit tests (#18002)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations? | no<!-- don't forget to update the UPGRADE-*.md file
-->
| Related tickets | partially #17837 
| License         | MIT

<!--
 - 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

- **Chores**
	- Updated test namespaces and directory paths to improve consistency.
	- Removed PhpSpec configuration and related files.
	- Adjusted test autoload settings for better organization.
- **Tests**
	- No changes to test logic; only namespace and configuration updates.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-15 08:51:48 +02:00
Mateusz
304360e874 Removed spec folder 2025-05-14 13:14:41 +02:00
Mateusz
39e575508f Add missing method invocation expectation 2025-05-14 12:48:48 +02:00
Kacper Kubacki
45aa48f0d1 OP-571: Rewrite PHPSpec tests to PHPUnit 2025-05-14 12:39:20 +02:00
Mateusz
e1ef71b1dc Add PHPUnit tests 2025-05-14 11:55:15 +02:00
Mateusz
b74e2dd4f9 Add non-test files 2025-05-14 11:55:15 +02:00
Mateusz
e45beb4e5e Fix typo 2025-05-14 09:02:21 +02:00
Mateusz
bf80e37441 Changed method names, code formatting cleanup 2025-05-14 08:38:56 +02:00
Mateusz
80441dd968 Fixing function names 2025-05-13 15:59:33 +02:00
Mateusz
fa4a5acecc Fixing function names 2025-05-13 14:42:29 +02:00
Mateusz
4e428874c8 Add PHPUnit tests 2025-05-13 13:56:18 +02:00
Mateusz
bd91c5efda Add PHPUnit tests 2025-05-13 13:56:18 +02:00
Mateusz
dd7dffec02 Initial changes in composer 2025-05-13 13:56:18 +02:00
Grzegorz Sadowski
f2872279d7
[PHPSpec to PHPUnit] Customer Component (#18003)
| 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 -->
2025-05-13 12:00:09 +02:00
Grzegorz Sadowski
c9f83d1fd7
[PHPSpec to PHPUnit] Attribute Component (#17984)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | OP-571
| License         | MIT

<!--
 - 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**
- Migrated the test suite from PHPSpec to PHPUnit for improved
compatibility and maintainability.
- Added new PHPUnit tests covering attribute types, factories, and
models to ensure comprehensive test coverage.
  - Removed legacy PHPSpec tests and configuration files.
- **Documentation**
  - Minor punctuation correction in the README file.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-13 11:56:17 +02:00
Grzegorz Sadowski
42e8ce535e
Exclude bundle tests directory from phpstan 2025-05-13 11:30:30 +02:00
Grzegorz Sadowski
52317a11af
[ShippingBundle] Replace PHPSpec with PHPUnit tests 2025-05-13 11:16:34 +02:00
Norbert Glanc
d884b7ebb1 Update code after refactor suggestion 2025-05-13 11:08:08 +02:00
Norbert Glanc
b450d343ca Code refactor 2025-05-13 10:57:56 +02:00
Grzegorz Sadowski
d26f4dd078
[PHPSpec to PHPUnit] Shipping Component (#18004)
| Q               | A
|-----------------|-----
| Branch?         | 2.1
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | OP-571
| License         | MIT

Transformed tests from Component/Shipping from PHPSpec to PHPUnit.

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

## Summary by CodeRabbit

- **Tests**
  - Migrated all shipping component tests from PhpSpec to PHPUnit.
- Added comprehensive PHPUnit test coverage for calculators, eligibility
checkers, rule checkers, models, resolvers, and exceptions.
- Improved test organization and configuration with new PHPUnit setup
files.
- **Chores**
  - Updated development dependencies and autoloading configuration.
  - Removed legacy PhpSpec configuration and test files.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-13 10:46:52 +02:00