Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

use secure https #1186

Merged
merged 2 commits into from
May 31, 2017
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
2 changes: 1 addition & 1 deletion src/Faker/Provider/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Image extends Base
*/
public static function imageUrl($width = 640, $height = 480, $category = null, $randomize = true, $word = null, $gray = false)
{
$baseUrl = "http://lorempixel.com/";
$baseUrl = "https://lorempixel.com/";
$url = "{$width}/{$height}/";

if ($gray) {
Expand Down
8 changes: 4 additions & 4 deletions test/Faker/Provider/ImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ class ImageTest extends \PHPUnit_Framework_TestCase
{
public function testImageUrlUses640x680AsTheDefaultSize()
{
$this->assertRegExp('#^http://lorempixel.com/640/480/#', Image::imageUrl());
$this->assertRegExp('#^https://lorempixel.com/640/480/#', Image::imageUrl());
}

public function testImageUrlAcceptsCustomWidthAndHeight()
{
$this->assertRegExp('#^http://lorempixel.com/800/400/#', Image::imageUrl(800, 400));
$this->assertRegExp('#^https://lorempixel.com/800/400/#', Image::imageUrl(800, 400));
}

public function testImageUrlAcceptsCustomCategory()
{
$this->assertRegExp('#^http://lorempixel.com/800/400/nature/#', Image::imageUrl(800, 400, 'nature'));
$this->assertRegExp('#^https://lorempixel.com/800/400/nature/#', Image::imageUrl(800, 400, 'nature'));
}

public function testImageUrlAcceptsCustomText()
{
$this->assertRegExp('#^http://lorempixel.com/800/400/nature/Faker#', Image::imageUrl(800, 400, 'nature', false, 'Faker'));
$this->assertRegExp('#^https://lorempixel.com/800/400/nature/Faker#', Image::imageUrl(800, 400, 'nature', false, 'Faker'));
}

public function testImageUrlAddsARandomGetParameterByDefault()
Expand Down