Skip to content

Nx Integration Tests#64

Merged
Vinai merged 1 commit intomage-os:2.4-developfrom
adamzero1:nx-integration-tests-v2
Dec 4, 2023
Merged

Nx Integration Tests#64
Vinai merged 1 commit intomage-os:2.4-developfrom
adamzero1:nx-integration-tests-v2

Conversation

@adamzero1
Copy link
Contributor

Description (*)

Github workflow for automatically running Integration Tests for the code that has changed in a PR. (Leveraging Nx).

Related Pull Requests

https://github.com/mage-os/github-actions/pull/184/files

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

@adamzero1 adamzero1 requested a review from a team as a code owner December 4, 2023 16:45
@Vinai Vinai merged commit fdbc879 into mage-os:2.4-develop Dec 4, 2023
mage-os-ci pushed a commit that referenced this pull request Feb 6, 2026
…ethods

Fixed 3 test failures by using proper PHPUnit 12 pattern.

Files fixed:
1. AbstractBlockTest::testGetVar - 1 test ✅
   - Changed deprecated createMock(AbstractBlock, $constructorArgs)
   - To: getMockBuilder()->setConstructorArgs()->onlyMethods([])->getMock()

2. SearchResultTest - 2 tests ✅
   - Changed createMock(SearchResult) which returns null for all methods
   - To: getMockBuilder()->onlyMethods([])->getMock()
   - This allows real method implementations (setTotalCount, getTotalCount, etc.)

Pattern: When tests need real method implementations to work:
  $mock = $this->getMockBuilder(Class::class)
      ->disableOriginalConstructor()     // Skip constructor if needed
      ->onlyMethods([])                   // Don't override any methods
      ->getMock();

This creates a partial mock that allows all real methods to execute while
still being able to configure specific method behaviors if needed.

Commit #64 - Fixed 3 more test failures
Remaining: 12 failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants