@@ -43,15 +43,15 @@ public function testBuildUrlArticleApi()
4343 {
4444 $ api = $ this ->diffbot ->createArticleAPI ('crawl ' )->setDiscussion (false );
4545
46- $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Farticle%3F%26discussion%3Dfalse ' ;
46+ $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Farticle%3F%26timeout%3D30000% 26discussion%3Dfalse ' ;
4747 $ c = $ this ->diffbot ->crawl ('sitepoint_01 ' , $ api );
4848 $ c ->setSeeds (['http://sitepoint.com ' ]);
4949 $ this ->assertEquals ($ expected , $ c ->buildUrl ());
5050 }
5151
5252 public function testBuildUrlDefaultApi ()
5353 {
54- $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26mode%3Dauto ' ;
54+ $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26timeout%3D30000% 26mode%3Dauto ' ;
5555 $ c = $ this ->diffbot ->crawl ('sitepoint_01 ' );
5656 $ c ->setSeeds (['http://sitepoint.com ' ]);
5757 $ this ->assertEquals ($ expected , $ c ->buildUrl ());
@@ -67,7 +67,7 @@ public function testInvalidSeeds()
6767
6868 public function testPatternSetters ()
6969 {
70- $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&pageProcessPattern=class%3DarticleBody&urlCrawlPattern=%2Fcategory%2Fshoes||%21%2Fauthor%2F||%5Ehttp%3A%2F%2Fwww.diffbot.com||type%3Dproduct%24&urlProcessPattern=%2Fproduct%2Fdetail||%21%3Fcurrency%3Deuro&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26mode%3Dauto ' ;
70+ $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&pageProcessPattern=class%3DarticleBody&urlCrawlPattern=%2Fcategory%2Fshoes||%21%2Fauthor%2F||%5Ehttp%3A%2F%2Fwww.diffbot.com||type%3Dproduct%24&urlProcessPattern=%2Fproduct%2Fdetail||%21%3Fcurrency%3Deuro&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26timeout%3D30000% 26mode%3Dauto ' ;
7171 $ c = $ this ->diffbot ->crawl ('sitepoint_01 ' );
7272 $ c ->setSeeds (['http://sitepoint.com ' ]);
7373
@@ -85,7 +85,7 @@ public function testPatternSetters()
8585
8686 public function testRegexSetters ()
8787 {
88- $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&urlCrawlRegEx=/^[a-z0-9_-]{3,16}$/&urlProcessRegEx=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26mode%3Dauto ' ;
88+ $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&urlCrawlRegEx=/^[a-z0-9_-]{3,16}$/&urlProcessRegEx=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26timeout%3D30000% 26mode%3Dauto ' ;
8989 $ c = $ this ->diffbot ->crawl ('sitepoint_01 ' );
9090 $ c ->setSeeds (['http://sitepoint.com ' ]);
9191
@@ -114,7 +114,7 @@ public function maxHopsProvider()
114114 */
115115 public function testMaxHops ($ input , $ urlFragment )
116116 {
117- $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&maxHops= ' . $ urlFragment . '&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26mode%3Dauto ' ;
117+ $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&maxHops= ' . $ urlFragment . '&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26timeout%3D30000% 26mode%3Dauto ' ;
118118 $ c = $ this ->diffbot ->crawl ('sitepoint_01 ' );
119119 $ c ->setSeeds (['http://sitepoint.com ' ]);
120120
@@ -142,7 +142,7 @@ public function maxProvider()
142142 */
143143 public function testMax ($ input , $ urlFragment )
144144 {
145- $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&maxToCrawl= ' . $ urlFragment . '&maxToProcess= ' . $ urlFragment . '&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26mode%3Dauto ' ;
145+ $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&maxToCrawl= ' . $ urlFragment . '&maxToProcess= ' . $ urlFragment . '&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26timeout%3D30000% 26mode%3Dauto ' ;
146146 $ c = $ this ->diffbot ->crawl ('sitepoint_01 ' );
147147 $ c ->setSeeds (['http://sitepoint.com ' ]);
148148
@@ -177,7 +177,7 @@ public function notifyProviderOk()
177177 */
178178 public function testNotify ($ input , $ urlFragment )
179179 {
180- $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com& ' . $ urlFragment . '&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26mode%3Dauto ' ;
180+ $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com& ' . $ urlFragment . '&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26timeout%3D30000% 26mode%3Dauto ' ;
181181 $ c = $ this ->diffbot ->crawl ('sitepoint_01 ' );
182182 $ c ->setSeeds (['http://sitepoint.com ' ]);
183183
@@ -230,7 +230,7 @@ public function crawlDelayProviderOk()
230230 */
231231 public function testCrawlOk ($ input , $ urlFragment )
232232 {
233- $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&crawlDelay= ' . $ urlFragment . '&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26mode%3Dauto ' ;
233+ $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&crawlDelay= ' . $ urlFragment . '&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26timeout%3D30000% 26mode%3Dauto ' ;
234234 $ c = $ this ->diffbot ->crawl ('sitepoint_01 ' );
235235 $ c ->setSeeds (['http://sitepoint.com ' ]);
236236
@@ -280,7 +280,7 @@ public function repeatProviderOk()
280280 */
281281 public function testRepeatOk ($ input , $ urlFragment )
282282 {
283- $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&repeat= ' . $ urlFragment . '&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26mode%3Dauto ' ;
283+ $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&repeat= ' . $ urlFragment . '&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26timeout%3D30000% 26mode%3Dauto ' ;
284284 $ c = $ this ->diffbot ->crawl ('sitepoint_01 ' );
285285 $ c ->setSeeds (['http://sitepoint.com ' ]);
286286
@@ -314,8 +314,8 @@ public function testRepeatNotOk($input)
314314
315315 public function testOnlyProcessIfNew ()
316316 {
317- $ expected1 = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&onlyProcessIfNew=1&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26mode%3Dauto ' ;
318- $ expected2 = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&onlyProcessIfNew=0&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26mode%3Dauto ' ;
317+ $ expected1 = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&onlyProcessIfNew=1&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26timeout%3D30000% 26mode%3Dauto ' ;
318+ $ expected2 = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&onlyProcessIfNew=0&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26timeout%3D30000% 26mode%3Dauto ' ;
319319
320320 $ c = $ this ->diffbot ->crawl ('sitepoint_01 ' );
321321 $ c ->setSeeds (['http://sitepoint.com ' ]);
@@ -345,7 +345,7 @@ public function maxRoundsProvider()
345345 */
346346 public function testMaxRounds ($ input , $ urlFragment )
347347 {
348- $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&maxRounds= ' . $ urlFragment . '&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26mode%3Dauto ' ;
348+ $ expected = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&maxRounds= ' . $ urlFragment . '&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26timeout%3D30000% 26mode%3Dauto ' ;
349349 $ c = $ this ->diffbot ->crawl ('sitepoint_01 ' );
350350 $ c ->setSeeds (['http://sitepoint.com ' ]);
351351
@@ -356,8 +356,8 @@ public function testMaxRounds($input, $urlFragment)
356356
357357 public function testObeyRobots ()
358358 {
359- $ expected1 = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&obeyRobots=1&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26mode%3Dauto ' ;
360- $ expected2 = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&obeyRobots=0&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26mode%3Dauto ' ;
359+ $ expected1 = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&obeyRobots=1&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26timeout%3D30000% 26mode%3Dauto ' ;
360+ $ expected2 = 'https://api.diffbot.com/v3/crawl?token=demo&name=sitepoint_01&seeds=http%3A%2F%2Fsitepoint.com&obeyRobots=0&apiUrl=https%3A%2F%2Fapi.diffbot.com%2Fv3%2Fanalyze%3F%26timeout%3D30000% 26mode%3Dauto ' ;
361361 $ c = $ this ->diffbot ->crawl ('sitepoint_01 ' );
362362 $ c ->setSeeds (['http://sitepoint.com ' ]);
363363
0 commit comments