Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PHPUnit to Pest Converter #33

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

Merged
LaravelFreelancerNL merged 8 commits into next from shift-130456
Oct 8, 2024
Merged

PHPUnit to Pest Converter #33

LaravelFreelancerNL merged 8 commits into next from shift-130456
Oct 8, 2024

Conversation

Copy link
Owner

@LaravelFreelancerNL LaravelFreelancerNL commented Oct 7, 2024

This pull request contains changes for migrating your test suite from PHPUnit to Pest automated by the Pest Converter.

Before merging, you need to:

  • Checkout the shift-130456 branch
  • Review all of the comments below for additional changes
  • Run composer update to install Pest with your dependencies
  • Run vendor/bin/pest to verify the conversion

Copy link
Owner Author

LaravelFreelancerNL commented Oct 7, 2024
edited
Loading

⚠️ Shift detected helper methods in the following PHPUnit tests. Currently Pest does not support namespaces. As such, these functions may result in a naming conflict.

While Shift converted these methods to functions in the new Pest test, you should review these files to see if these functions may be inlined or extracted to a custom helper.

  • ./tests/ArangoClientTest.php
  • ./tests/SchemaManagerUsersTest.php
  • ./tests/StatementTest.php

Copy link
Owner Author

i️ Shift converted common PHPUnit assertions to Pest expectations. However, there may also be opportunities to chain your expectations together.

For example:

// Before
expect($comment)->toBeArray();
expect($comment)->toHaveCount(3);
expect($comment)->toContain('foo');
// After
expect($comment)->toBeArray()->toHaveCount(3)->toContain('foo');

Copy link
Owner Author

LaravelFreelancerNL commented Oct 7, 2024
edited
Loading

⚠️ Shift detected references to the PHPUnit test runner (vendor/bin/phpunit) in the following files. You should review these instances to see if they may be updated to the Pest test runner (vendor/bin/pest).

  • ./composer.json

Copy link
Owner Author

i️ By default, Pest executes your tests sequentially within a single process. However, you may significantly decrease the time needed to run your tests by utilizing the --parallel option. You may review the documentation on parallel testing for additional details.

Copy link
Owner Author

LaravelFreelancerNL commented Oct 7, 2024
edited
Loading

❌ PHP syntax errors were detected after running your Shift. Often these are simply differences between the PHP version on the Shift server (8.2) and your project. Occasionally they are misplaced lines or duplicate import statements.

You may quickly check the PHP syntax locally by running php -l on the following files:

  • tests/ExceptionsTest.php
  • tests/SchemaManagerAnalyzersTest.php
  • tests/SchemaManagerCollectionsTest.php
  • tests/SchemaManagerDatabasesTest.php
  • tests/SchemaManagerGraphsTest.php
  • tests/SchemaManagerIndexesTest.php
  • tests/SchemaManagerUsersTest.php
  • tests/SchemaManagerViewsTest.php

@LaravelFreelancerNL LaravelFreelancerNL merged commit 162a0fd into next Oct 8, 2024
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /