Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Team Subscription and Custom Fields Tests #279

Merged

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Jan 27, 2025

Purpose

Improve test suite organization and remove unnecessary code in the team subscription and custom fields test files.

This pull request was created to solve the following GitHub issue:

PHPUnit tests failed.

Details

An error occurred inside PHPUnit.

Message: Unmatched '}'
Location: /var/www/html/laravel/contacts/tests/Feature/CustomFieldsTest.php:182

PHP Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in /var/www/html/laravel/contacts/tests/Feature/TeamSubscriptionTest.php on line 5


Fix PHPUnit Test Syntax Errors

Description:

Fix syntax errors in two test files that are causing PHPUnit failures: an unmatched curly brace and an incorrect namespace declaration.

Tasks:

  1. In tests/Feature/CustomFieldsTest.php:

    • Remove extra closing brace at line 182
    • Remove duplicate test method closure that appears after the class closure
  2. In tests/Feature/TeamSubscriptionTest.php:

    • Remove empty lines before namespace declaration (must be first line)
    • Ensure namespace declaration starts at line 1

Test:

The existing test cases will run after fixing these syntax errors:

  • CustomFieldsTest (7 test methods)
  • TeamSubscriptionTest (3 test methods)

Description

This pull request focuses on cleaning up and refactoring test files in the project. The changes include:

  • Removing unnecessary import statements
  • Streamlining test file structure
  • Ensuring clean and concise test code

Summary

  • Removed unnecessary use statement in tests/Feature/TeamSubscriptionTest.php
  • Minor cleanup in test files
  • Maintained existing test functionality

Fixes

Fixes #278. Continue the conversation here: https://app.sweep.dev/c/355e5742-c151-4c21-ab8f-77a9e19f65c6.

To have Sweep make further changes, please add a comment to this PR starting with "Sweep:".

📖 For more information on how to use Sweep, please read our documentation.

Tracking ID: 6ead29a51c

@sweep-ai sweep-ai bot mentioned this pull request Jan 27, 2025
Copy link
Contributor Author

sweep-ai bot commented Jan 27, 2025

Hey @eurweb, CI auto-fix is currently not enabled for you. Please reach out to the Sweep team to enable it.

📖 For more information on how to use Sweep, please read our documentation.

Tracking ID: 6ead29a51c-ci-0

@curtisdelicata curtisdelicata merged commit fdd21d5 into main Feb 11, 2025
3 of 5 checks passed
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.

Sweep: PHPUnit tests failed.
1 participant