Skip to content

Commit

Permalink
Fix more test assertion methods
Browse files Browse the repository at this point in the history
Signed-off-by: Drew Robinson <drew.robinson@gmail.com>
  • Loading branch information
ocean committed Oct 14, 2020
1 parent 84552fd commit eef36cb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/Client/TestAdapterTest.php
Expand Up @@ -189,7 +189,7 @@ public function testSettingNextResponseToAnInvalidIndex()
$this->fail();
} catch (\Exception $e) {
$this->assertInstanceOf(OutOfRangeException::class, $e);
$this->assertRegexp('/out of range/i', $e->getMessage());
$this->assertMatchesRegularExpression('/out of range/i', $e->getMessage());
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/Header/LocationTest.php
Expand Up @@ -54,7 +54,7 @@ public function testLocationCanSetDifferentSchemeUris($uri, $expectedClass)
{
$locationHeader = new Location();
$locationHeader->setUri($uri);
$this->assertInstanceOf($expectedClass, $locationHeader->uri);
$this->assertInstanceOf($expectedClass, $locationHeader->uri());
}

/**
Expand All @@ -70,7 +70,7 @@ public function testLocationCanSetDifferentSchemeUriObjects($uri, $expectedClass
$uri = UriFactory::factory($uri);
$locationHeader = new Location();
$locationHeader->setUri($uri);
$this->assertInstanceOf($expectedClass, $locationHeader->uri);
$this->assertInstanceOf($expectedClass, $locationHeader->uri());
}

/**
Expand Down
4 changes: 2 additions & 2 deletions test/Header/SetCookieTest.php
Expand Up @@ -588,7 +588,7 @@ public function testSetJsonValue()
$cookie = new SetCookie($cookieName, $jsonData);

$regExp = sprintf('#^%s=%s#', $cookieName, urlencode($jsonData));
$this->assertRegExp($regExp, $cookie->getFieldValue());
$this->assertMatchesRegularExpression($regExp, $cookie->getFieldValue());

$cookieName = 'fooCookie';
$jsonData = json_encode(['foo' => 'bar']);
Expand All @@ -597,7 +597,7 @@ public function testSetJsonValue()
$cookie->setDomain('example.org');

$regExp = sprintf('#^%s=%s; Domain=#', $cookieName, urlencode($jsonData));
$this->assertRegExp($regExp, $cookie->getFieldValue());
$this->assertMatchesRegularExpression($regExp, $cookie->getFieldValue());
}

/**
Expand Down

0 comments on commit eef36cb

Please sign in to comment.