File: tests/UrlExtractorTest/UrlExtractorTest.php

Recommend this page to a friend!
  Classes of Joćo Ribeiro  >  PHP URL Extractor  >  tests/UrlExtractorTest/UrlExtractorTest.php  >  Download  
File: tests/UrlExtractorTest/UrlExtractorTest.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: PHP URL Extractor
Extract URLs of images and metadata from Web pages
Author: By
Last change: Updated class namespace and created a composer.json file.
Date: 6 years ago
Size: 768 bytes


Class file image Download

class UrlExtractorTest extends PHPUnit_Framework_TestCase
    public function

$expectedData = array(
"title" => "rollbackpt (Joao Ribeiro)",
"description" =>
"rollbackpt has 11 repositories written in JavaScript, PHP, and Cuda. Follow their code on GitHub.",
"keywords" => array("rollbackpt", "github", "urlextractor", "demo"),
"images" => array(0 => ";s=400")

$urlExtractor = new \rollbackpt\UrlExtractor\UrlExtractor();
$urlData = $urlExtractor->extractAll("file://" . dirname(__FILE__) . "/test_website.html", false);
$this->assertEquals($urlData, $expectedData);

For more information send a message to info at phpclasses dot org.