Skip to content

Avoid assertInternalType #103

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

Merged
merged 3 commits into from
Mar 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
language: php

branches:
only:
- master

sudo: false

php:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"require-dev": {
"phpstan/phpstan": "^0.9.2",
"phpstan/phpstan-phpunit": "^0.9.4",
"phpunit/phpunit": "^7.0.3",
"phpunit/phpunit": "^7.5.0 || ^8.0",
"squizlabs/php_codesniffer": "^3.3.1"
},
"autoload": {
Expand Down
3 changes: 1 addition & 2 deletions src/Traits/EndpointTestCases.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ protected function getSafeInput(array $parsedRequest): Containers\SafeInput
public function testGetUri(string $uri, bool $match, array $expectedMatches)
{
$endpoint = $this->getEndpoint();
$this->assertInternalType(
'string',
$this->assertIsString(
$endpoint->getUri(),
'getUri did not return a string'
);
Expand Down
4 changes: 2 additions & 2 deletions tests/Console/CompileAllTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ public function testExecute()

private function validateEndpointList($data)
{
$this->assertInternalType('array', $data);
$this->assertIsArray($data);
$this->assertArrayHasKey('@gener'.'ated', $data);
$this->assertArrayHasKey('GET', $data);
$this->assertContains(EndpointFixture::class, $data['GET']);
}

private function validateParserList($data)
{
$this->assertInternalType('array', $data);
$this->assertIsArray($data);
$this->assertArrayHasKey('@gener'.'ated', $data);
$this->assertArrayHasKey('application/json', $data);
$this->assertArrayHasKey('application/x-www-form-urlencoded', $data);
Expand Down
6 changes: 3 additions & 3 deletions tests/Traits/EndpointTestCasesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public function testUris()
$data = $this->uris();
foreach ($data as $testCase) {
list($uri, $shouldMatch, $matches) = $testCase;
$this->assertInternalType('string', $uri);
$this->assertInternalType('bool', $shouldMatch);
$this->assertInternalType('array', $matches);
$this->assertIsString($uri);
$this->assertIsBool($shouldMatch);
$this->assertIsArray($matches);
}
}

Expand Down