-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
Strictness cleanups in test class #26005
Conversation
(Standard links)
|
$expected = trim((preg_replace('/[ \r\n\t]+/', ' ', $expected))); | ||
$actual = trim((preg_replace('/[ \r\n\t]+/', ' ', $actual))); | ||
$this->assertEquals($expected, $actual, $message); | ||
public function assertLike(string $expectedSQL, string $actualSQL, string $message = '') { |
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.
hmm IDE made params the same as parent - do these just duplicate parent?
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.
Yep - fn can go
* @param $actual | ||
* @param string $message | ||
*/ | ||
public function assertLike($expected, $actual, $message = '') { |
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.
turns out to be in parent 5.15 release notes seem to indicate there was some consolidation of it then
@@ -2547,12 +2548,10 @@ protected function eventPriceSetCreate($feeTotal, $minAmt = 0, string $type = 'T | |||
} | |||
$priceFieldID = $this->callAPISuccess('PriceField', 'create', $paramsField)['id']; | |||
$this->ids['PriceField']['event_' . strtolower($type)] = $priceFieldID; | |||
$this->_ids['price_field'] = [$priceFieldID]; |
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.
This might cause test fails - but it is extraneous so I will fix the tests if so. PHP 8 wouldn't like this
4188615
to
b4abbb8
Compare
b4abbb8
to
3d28114
Compare
Overview
Strictness cleanups in test class
Before
In strict mode we see
After
I removed the sha bit - that randomisation is just a work-around for sloppy cleanup anyway - if the cleanup is done between tests we don't need to randomise
Technical Details
Various other minor cleanups
Comments