tests/GetBrowserTest.php
/**
     * get() should return a browser if ip address and user-agent are valid
     */
get() should return a browser if ip address and user-agent are valid
get () should return a browser if ip address and user - agent are valid
public function testGetReturnsBrowserIfIpAndUserAgentAreValid()
    {
        $userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) '
            . 'AppleWebKit/601.6.17 (KHTML, like Gecko) Version/9.1.1 '
            . 'Safari/601.6.17';
        $expected = (new Browser())
            ->setPlatform('Macintosh')
            ->setName('Safari')
            ->setVersion('9.1.1');
        $actual = (new GetBrowser())($userAgent);
        $this->assertEquals($expected, $actual);
        return;
    }
public function testGetReturnsBrowserIfIpAndUserAgentAreValid ( ) { $ userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) ' . 'AppleWebKit/601.6.17 (KHTML, like Gecko) Version/9.1.1 ' . 'Safari/601.6.17' ; $ expected = ( new Browser ( ) ) -> setPlatform ( 'Macintosh' ) -> setName ( 'Safari' ) -> setVersion ( '9.1.1' ) ; $ actual = ( new GetBrowser ( ) ) ( $ userAgent ) ; $ this -> assertEquals ( $ expected , $ actual ) ; return ; }
get() should return a browser if ip address and user-agent are valid
get () should return a browser if ip address and user - agent are valid