PEAR2_Services_NYTimesPEAR2_Services_NYTimes-0.1.0/test/pear2.php.net/PEAR2_Services_NYTimes/Services/NYTimes/MainTest.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
 * PEAR2\Services\NYTimes\MainTest
 *
 * PHP version 5
 *
 * @category  Services
 * @package   PEAR2_Services_NYTimes
 * @author    Till Klampaeckel <till@php.net>
 * @copyright 2011 Till Klampaeckel
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
 * @version   SVN: $Id$
 * @link      https://github.com/pear2/Services_NYTimes
 */

/**
 * MainTest covers {@link \PEAR2\Services\NYTimes\Main}.
 *
 * @category  Services
 * @package   PEAR2_Services_NYTimes
 * @author    Till Klampaeckel <till@php.net>
 * @copyright 2011 Till Klampaeckel
 * @license   http://www.opensource.org/licenses/bsd-license.php New BSD License
 * @link      https://github.com/pear2/Services_NYTimes
 */
namespace PEAR2\Services\NYTimes;
class MainTest extends \PHPUnit_Framework_TestCase
{
    public function testFactory()
    {
        $newswire = Main::factory('newswire', 'foo');
        $this->assertInstanceOf('PEAR2\Services\NYTimes\Newswire', $newswire);
    }

    /**
     * @expectedException \DomainException
     */
    public function testException()
    {
        Main::factory('WhatUpApi', 'foo');
    }
}
EOF