Skip to content

Conversation

@peter279k
Copy link
Contributor

Changed log

  • It seems that this package requires php-7.1 version at least, and it should modify semver version on composer.json file.
  • According to the official PHPUnit doc, it should be protected function setUp(): void.

$this->assertSame('methodValue', invoke_first($this->listIterator, 'method'));
$this->assertSame(null, invoke_first($this->list, 'undefinedMethod'));
$this->assertSame(null, invoke_first($this->list, 'setExpectedExceptionFromAnnotation'), 'Protected method');
$this->assertNull(invoke_first($this->list, 'undefinedMethod'));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should use the assertNull to assert expected is null.

$this->assertSame('methodValue', invoke_first($this->iteratorVeryFirstNotCallable, 'method'));
$this->assertSame(null, invoke_first($this->arrayVeryFirstNotCallable, 'undefinedMethod'));
$this->assertSame(null, invoke_first($this->arrayVeryFirstNotCallable, 'setExpectedExceptionFromAnnotation'), 'Protected method');
$this->assertNull(invoke_first($this->arrayVeryFirstNotCallable, 'undefinedMethod'));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should use the assertNull to assert expected is null.

$this->assertSame('methodValue', invoke_last($this->listIterator, 'method'));
$this->assertSame(null, invoke_last($this->list, 'undefinedMethod'));
$this->assertSame(null, invoke_last($this->list, 'setExpectedExceptionFromAnnotation'), 'Protected method');
$this->assertNull(invoke_last($this->list, 'undefinedMethod'));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should use the assertNull to assert expected is null.

$this->assertSame('2', pick($this->array_1, 'two'));
$this->assertSame(
null,
$this->assertNull(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should use the assertNull to assert expected is null.

$this->assertSame(':)', pick($this->array_1, 'zero-index', ':)', $customCallback));
$this->assertSame('0', pick($this->array_1, 'zero-string-index', ':)', $customCallback));
$this->assertSame(false, pick($this->array_1, 'false-index', ':)', $customCallback));
$this->assertFalse(pick($this->array_1, 'false-index', ':)', $customCallback));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should use the assertFalse to assert expected is false.

Copy link
Owner

@lstrojny lstrojny left a comment

Choose a reason for hiding this comment

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

Looks good, thank you! Can you fix the composer conflict so I can merge?

Base automatically changed from master to main March 5, 2021 16:00
@peter279k
Copy link
Contributor Author

There're many conflicts to be concerned.

I decide to close this PR and create another one :).

@peter279k peter279k closed this Mar 7, 2021
@peter279k peter279k deleted the test_enhancement branch March 7, 2021 14:53
peter279k added a commit to open-source-contributions/functional-php that referenced this pull request Mar 7, 2021
@peter279k peter279k mentioned this pull request Mar 7, 2021
lstrojny pushed a commit that referenced this pull request Mar 8, 2021
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.

2 participants