-
Notifications
You must be signed in to change notification settings - Fork 41
Update rector config to actually fix issues in tests #2978
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,8 +10,7 @@ class test_FrmAddon extends FrmUnitTest { | |
| public function setUp(): void { | ||
| parent::setUp(); | ||
|
|
||
| $this->addon = $this->getMockBuilder( 'FrmTestAddon' ) | ||
| ->setMethods( null ) | ||
| $this->addon = $this->getMockBuilder( 'FrmTestAddon' )->setMethods() | ||
| ->getMock(); | ||
|
Comment on lines
+13
to
14
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check the required/installed PHPUnit version
rg -i 'phpunit' composer.json -A 2 -B 2Repository: Strategy11/formidable-forms Length of output: 234 🌐 Web query:
💡 Result: PHPUnit
Migration mapping
Sources: Moodle upgrade notes [1], Drupal issue referencing PR 🏁 Script executed: #!/bin/bash
# Get the full composer.json to find PHPUnit version
cat composer.json | jq '.require, .require-dev' 2>/dev/null || head -100 composer.jsonRepository: Strategy11/formidable-forms Length of output: 1408 🏁 Script executed: #!/bin/bash
# Also check composer.lock for installed PHPUnit version
rg '"name": "phpunit' composer.lock -A 2 | head -20Repository: Strategy11/formidable-forms Length of output: 124 🏁 Script executed: #!/bin/bash
# Find phpunit configuration
fd -name 'phpunit.xml*'Repository: Strategy11/formidable-forms Length of output: 301 🏁 Script executed: #!/bin/bash
# Check the test file to understand what setMethods() is doing
cat -n tests/phpunit/misc/test_FrmAddon.php | head -40Repository: Strategy11/formidable-forms Length of output: 1335 🏁 Script executed: #!/bin/bash
# Find phpunit configuration files
fd phpunitRepository: Strategy11/formidable-forms Length of output: 137 🏁 Script executed: #!/bin/bash
# Check if there are any CI/workflow files that specify PHPUnit version
fd -e yml -e yaml | xargs grep -l phpunit 2>/dev/null | head -5Repository: Strategy11/formidable-forms Length of output: 53 🏁 Script executed: #!/bin/bash
# Check the phpunit.xml file
cat phpunit.xmlRepository: Strategy11/formidable-forms Length of output: 949 🏁 Script executed: #!/bin/bash
# Check bootstrap file for PHPUnit version hints
cat tests/phpunit/bootstrap.php | head -50Repository: Strategy11/formidable-forms Length of output: 1028 🏁 Script executed: #!/bin/bash
# Check GitHub workflows for PHPUnit version
fd -e yml -e yaml .github 2>/dev/null | xargs cat 2>/dev/null | grep -i phpunit -C 3 || echo "No workflows found"Repository: Strategy11/formidable-forms Length of output: 89 🏁 Script executed: #!/bin/bash
# Check if there's a .github/workflows directory or CI config
find . -type d -name '.github' -o -name '.gitlab-ci*' -o -name '.travis*' 2>/dev/null | head -5Repository: Strategy11/formidable-forms Length of output: 80 🏁 Script executed: #!/bin/bash
# Check README or documentation for PHPUnit version requirements
find . -maxdepth 2 -type f \( -name 'README*' -o -name 'CONTRIBUTE*' -o -name 'DEV*' \) -exec head -50 {} \; 2>/dev/null | grep -i phpunit -C 2 || echo "No PHPUnit version info in docs"Repository: Strategy11/formidable-forms Length of output: 102 🏁 Script executed: #!/bin/bash
# List contents of .github directory
ls -la .github/Repository: Strategy11/formidable-forms Length of output: 311 🏁 Script executed: #!/bin/bash
# Check all YAML files in .github for PHPUnit mentions
find .github -type f -name '*.yml' -o -name '*.yaml' | xargs cat 2>/dev/nullRepository: Strategy11/formidable-forms Length of output: 13279 Remove the no-op
Current code:$this->addon = $this->getMockBuilder( 'FrmTestAddon' )->setMethods()
->getMock();Remove 🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
|
|
@@ -30,7 +29,7 @@ public function test_construct() { | |
| */ | ||
| public function test_insert_installed_addon() { | ||
| $plugins = apply_filters( 'frm_installed_addons', array() ); | ||
| $this->assertTrue( isset( $plugins['signature'] ) ); | ||
| $this->assertArrayHasKey( 'signature', $plugins ); | ||
| } | ||
|
|
||
| /** | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in error message: "Email email" → "Empty email".
📝 Committable suggestion
🤖 Prompt for AI Agents