Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Commit 82125bc

Browse files
committed
Fixing travis build errors
1 parent 780e46c commit 82125bc

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
[![Build Status](https://api.travis-ci.org/MrJoshLab/laravel-phantomjs.svg?branch=develop)](https://travis-ci.org/iamalirezaj/laravel-phantomjs)
1+
[![Build Status](https://api.travis-ci.org/MrJoshLab/laravel-phantomjs.svg?branch=develop)](https://travis-ci.org/MrJoshLab/laravel-phantomjs)
22
[![Latest Stable Version](https://poser.pugx.org/josh/laravel-phantomjs/v/stable)](https://packagist.org/packages/josh/laravel-phantomjs)
33
[![Total Downloads](https://poser.pugx.org/josh/laravel-phantomjs/downloads)](https://packagist.org/packages/josh/laravel-phantomjs)
44
[![Latest Unstable Version](https://poser.pugx.org/josh/laravel-phantomjs/v/unstable)](https://packagist.org/packages/josh/laravel-phantomjs)
55
[![License](https://poser.pugx.org/josh/laravel-phantomjs/license)](https://packagist.org/packages/josh/laravel-phantomjs)
6-
[![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/iamalirezaj)
76

87
# Laravel PhantomJs Client
98
Using phantomjs client in laravel

composer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
{
22
"name": "josh/laravel-phantomjs",
33
"description": "Use phantom-js in laravel",
4-
"keywords": ["phantomjs-php", "phantomjs","phantom-js", "laravel"],
4+
"keywords": [
5+
"phantomjs-php",
6+
"phantomjs",
7+
"phantom-js",
8+
"laravel"
9+
],
510
"license": "MIT",
611
"support": {
7-
"issues": "https://github.com/iamalirezaj/laravel-phantomjs/issues",
8-
"source": "https://github.com/iamalirezaj/laravel-phantomjs"
12+
"issues": "https://github.com/MrJoshLab/laravel-phantomjs/issues",
13+
"source": "https://github.com/MrJoshLab/laravel-phantomjs"
914
},
1015
"authors": [
1116
{

src/PhantomJs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public function isLazy()
190190
* @param array $parameters
191191
* @return Request
192192
*/
193-
public function request(string $url, string $method = RequestInterface::METHOD_GET, int $timeout = 5000, array $headers = [], array $parameters = []) : Request
193+
public function request(string $url, string $method = "GET", int $timeout = 5000, array $headers = [], array $parameters = []) : Request
194194
{
195195
$request = new Request($url, $method, $timeout);
196196

tests/PhantomJsRequestTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Tests;
44

5+
use Illuminate\Support\Str;
6+
57
class PhantomJsRequestTest extends TestCase
68
{
79
/**
@@ -13,11 +15,11 @@ class PhantomJsRequestTest extends TestCase
1315
*/
1416
public function testSimpleRequest()
1517
{
16-
$request = $this->phantomjs->get('http://phantomjs.org/');
18+
$request = $this->phantomjs->get('https://www.google.com/');
1719

1820
$response = $this->phantomjs->send($request);
1921

20-
$this->assertEquals($response->getUrl(),'http://phantomjs.org/');
22+
$this->assertEquals($response->getUrl(),'https://www.google.com/');
2123
$this->assertEquals($response->getStatus(),200);
2224
}
2325

@@ -32,7 +34,7 @@ public function testSimpleRequest()
3234
public function testCreatePdf()
3335
{
3436
$request = $this->phantomjs->createPdf('http://phantomjs.org/');
35-
$request->setOutputFile($filename = str_random(30) . '.pdf');
37+
$request->setOutputFile($filename = Str::random(30) . '.pdf');
3638
$request->setFormat('A4');
3739
$request->setOrientation('landscape');
3840
$request->setMargin('1cm');
@@ -54,7 +56,7 @@ public function testCreatePdf()
5456
public function testCreateImage()
5557
{
5658
$request = $this->phantomjs->createImage('http://phantomjs.org/');
57-
$request->setOutputFile($filename = str_random(30) . '.png');
59+
$request->setOutputFile($filename = Str::random(30) . '.png');
5860
$request->setViewportSize(800, 600);
5961
$request->setCaptureDimensions(800, 600, 0, 0);
6062

0 commit comments

Comments
 (0)