Skip to content

Use stricter syntax when testing #9046

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

Closed
wants to merge 1 commit into from
Closed

Conversation

matt9mg
Copy link
Contributor

@matt9mg matt9mg commented Jan 12, 2018

e.g.

$mailCollector->getMessageCount();

returns an int so its better to use

$this->assertSame($expected, $actual);

will also meaning faster testing and better testing within the given example.

e.g. `$mailCollector->getMessageCount()` returns an int so its better to use $this->assertSame will also meaning faster testing and better testing within the example given.
@javiereguiluz
Copy link
Member

Thanks Matthew.

javiereguiluz added a commit that referenced this pull request Jan 13, 2018
This PR was submitted for the 4.0 branch but it was merged into the 2.7 branch instead (closes #9046).

Discussion
----------

Use stricter syntax when testing

e.g.
```php
$mailCollector->getMessageCount();
```
returns an int so its better to use

```php
$this->assertSame($expected, $actual);
````

will also meaning faster testing and better testing within the given example.

Commits
-------

3d8ee63 Use stricter syntax when testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants