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

Created new Mutator for strtoupper function #535

Closed
wants to merge 28 commits into from

Conversation

zf2timo
Copy link
Contributor

@zf2timo zf2timo commented Oct 31, 2018

This PR:

sanmai and others added 2 commits October 30, 2018 22:14
…ion#523)

* Restrict installation with broken versions of symfony/console

Also ignore bogus PHPStan warnings.

* Update TestFrameworkFinder to always look for a .bat first. (infection#506)

* Update TestFrameworkFinder to always look for a .bat first.

Fixes infection#503

* Phpunit_Bat_Wrapper: add cwd to path just for this test

* Phpunit_Bat_Wrapper: it does not matter if Infection succeeds, only it must find phpunit.bat
Copy link
Member

@maks-rafalko maks-rafalko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for creating this PR. There are some copy-paste errors, besides that looks good

<<<'PHP'
<?php

function array_flip($text)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be function strtoupper

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@borNfreee @zf2timo

Ha, made the same mistake a couple of times! 🤓

PHP
];

yield 'It does not mutate functions named array_flip' => [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

array_flip -> strtoupper

<<<'PHP'
<?php

$a = strtoupper(['A', 1, 'C']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest using string, not an array for all these examples, because strtoupper works with strings ;)

PHP
];

yield 'It mutates correctly when array_flip is wrongly capitalized' => [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

array_flip -> strtoupper

PHP
];

yield 'It mutates correctly when array_flip uses another function as input' => [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

array_flip -> strtoupper

localheinz and others added 9 commits November 1, 2018 03:22
* Enhancement: Enable no_superfluous_phpdoc_tags fixer

* Fix: Run php-cs-fixer

* Fix: Remove useless DocBlocks
…ection#519)

* Run project's tests in a random order for InitialTestRun process if it's possible

* Run project's tests in a random order for PHPUnit 7.2+

* Remove config.platform.php=7.0 from e2e tests. Add PHPUnit's cache file to .gitignore

* Do not update executionOrder if it is set in phpunit.xml

* Improve exception message to inform users about how to not allow Infection randomize tests

* Add e2e test to ensure Infection does not try to randomize tests execution order when `phpunit.xml` contains `executeOrder="XXX"`
Copy link
Member

@maks-rafalko maks-rafalko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this needs to be rebased to use a new approach with yield, see

for an example.

@zf2timo are you going to finish this one or can we take over it? I'm planning a release soon, want to get this merged before it is published

@maks-rafalko maks-rafalko added this to the 0.11.0 milestone Nov 4, 2018
@zf2timo
Copy link
Contributor Author

zf2timo commented Nov 4, 2018

@borNfreee Sorry for the delay. I was an a small vacation.
I will change this PR later today.

@localheinz
Copy link
Member

@zf2timo

Ha, looks like something went wrong with the rebase.

@zf2timo
Copy link
Contributor Author

zf2timo commented Nov 5, 2018

@localheinz yes, this looks bad.

@borNfreee maybe I create a new PR?

@maks-rafalko
Copy link
Member

Yeah, let's do it

@zf2timo zf2timo mentioned this pull request Nov 5, 2018
3 tasks
@zf2timo
Copy link
Contributor Author

zf2timo commented Nov 5, 2018

Closed by #551

@zf2timo zf2timo closed this Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants