PHP Classes

File: tests/unit/RequestFactoryTest.php

Recommend this page to a friend!
  Classes of Oleksii Mylotskyi  >  KeywordTool Client  >  tests/unit/RequestFactoryTest.php  >  Download  
File: tests/unit/RequestFactoryTest.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: KeywordTool Client
Get search engines keyword volume and suggestions
Author: By
Last change:
Date: 5 years ago
Size: 1,161 bytes
 

Contents

Class file image Download
<?php
namespace KWTClient\Tests\Unit;

use
KWTClient\Request\Request;
use
KWTClient\RequestFactory;

class
RequestFactoryTest extends \PHPUnit_Framework_TestCase
{
    public function
testGoogleRequest()
    {
       
$newInstance = new Request('test', 'http://api.keywordtool.io/v1/search/google');
       
$request = RequestFactory::google('test');

       
$this->assertEquals($newInstance, $request);
    }

    public function
testYoutubeRequest()
    {
       
$newInstance = new Request('test', 'http://api.keywordtool.io/v1/search/youtube');
       
$request = RequestFactory::youtube('test');

       
$this->assertEquals($newInstance, $request);
    }

    public function
testBingRequest()
    {
       
$newInstance = new Request('test', 'http://api.keywordtool.io/v1/search/bing');
       
$request = RequestFactory::bing('test');

       
$this->assertEquals($newInstance, $request);
    }

    public function
testAppStoreRequest()
    {
       
$newInstance = new Request('test', 'http://api.keywordtool.io/v1/search/app-store');
       
$request = RequestFactory::appstore('test');

       
$this->assertEquals($newInstance, $request);
    }
}

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