diff --git a/tests/Authentication/OAuth2ClientTest.php b/tests/Authentication/OAuth2ClientTest.php index 5b144d7b7..264b97405 100644 --- a/tests/Authentication/OAuth2ClientTest.php +++ b/tests/Authentication/OAuth2ClientTest.php @@ -82,7 +82,7 @@ public function testCanBuildAuthorizationUrl() $this->assertContains('*', $authUrl); $expectedUrl = 'https://www.facebook.com/' . static::TESTING_GRAPH_VERSION . '/dialog/oauth?'; - $this->assertTrue(strpos($authUrl, $expectedUrl) === 0, 'Unexpected base authorization URL returned from getAuthorizationUrl().'); + $this->assertStringStartsWith($expectedUrl, $authUrl, 'Unexpected base authorization URL returned from getAuthorizationUrl().'); $params = [ 'client_id' => '123', diff --git a/tests/FacebookRequestTest.php b/tests/FacebookRequestTest.php index 3211b8eb0..2433c78af 100755 --- a/tests/FacebookRequestTest.php +++ b/tests/FacebookRequestTest.php @@ -182,7 +182,7 @@ public function testAFileCanBeAddedToParams() $this->assertTrue($request->containsFileUploads()); $this->assertFalse($request->containsVideoUploads()); - $this->assertTrue(!isset($actualParams['source'])); + $this->assertFalse(isset($actualParams['source'])); $this->assertEquals('Foo Bar', $actualParams['name']); } @@ -200,7 +200,7 @@ public function testAVideoCanBeAddedToParams() $this->assertTrue($request->containsFileUploads()); $this->assertTrue($request->containsVideoUploads()); - $this->assertTrue(!isset($actualParams['source'])); + $this->assertFalse(isset($actualParams['source'])); $this->assertEquals('Foo Bar', $actualParams['name']); } } diff --git a/tests/GraphNodes/CollectionTest.php b/tests/GraphNodes/CollectionTest.php index 14af47684..0e9685d73 100755 --- a/tests/GraphNodes/CollectionTest.php +++ b/tests/GraphNodes/CollectionTest.php @@ -71,7 +71,7 @@ public function testFalseDefaultsWillReturnSameType() $this->assertSame(0, $field); $field = $graphNode->getField('baz', false); - $this->assertSame(false, $field); + $this->assertFalse($field); } public function testTheKeysFromTheCollectionCanBeReturned() diff --git a/tests/Helpers/FacebookRedirectLoginHelperTest.php b/tests/Helpers/FacebookRedirectLoginHelperTest.php index 3b4d6a9be..1a429551d 100644 --- a/tests/Helpers/FacebookRedirectLoginHelperTest.php +++ b/tests/Helpers/FacebookRedirectLoginHelperTest.php @@ -59,7 +59,7 @@ public function testLoginURL() $loginUrl = $this->redirectLoginHelper->getLoginUrl(self::REDIRECT_URL, $scope); $expectedUrl = 'https://www.facebook.com/v1337/dialog/oauth?'; - $this->assertTrue(strpos($loginUrl, $expectedUrl) === 0, 'Unexpected base login URL returned from getLoginUrl().'); + $this->assertStringStartsWith($expectedUrl, $loginUrl, 'Unexpected base login URL returned from getLoginUrl().'); $params = [ 'client_id' => '123', @@ -77,16 +77,14 @@ public function testLogoutURL() { $logoutUrl = $this->redirectLoginHelper->getLogoutUrl('foo_token', self::REDIRECT_URL); $expectedUrl = 'https://www.facebook.com/logout.php?'; - $this->assertTrue(strpos($logoutUrl, $expectedUrl) === 0, 'Unexpected base logout URL returned from getLogoutUrl().'); + $this->assertStringStartsWith($expectedUrl, $logoutUrl, 'Unexpected base logout URL returned from getLogoutUrl().'); $params = [ 'next' => self::REDIRECT_URL, 'access_token' => 'foo_token', ]; foreach ($params as $key => $value) { - $this->assertTrue( - strpos($logoutUrl, $key . '=' . urlencode($value)) !== false - ); + $this->assertContains($key . '=' . urlencode($value), $logoutUrl); } }