1<?php
2/**
3 * This file is part of the Tmdb PHP API created by Michael Roterman.
4 *
5 * For the full copyright and license information, please view the LICENSE
6 * file that was distributed with this source code.
7 *
8 * @package Tmdb
9 * @author Michael Roterman <michael@wtfz.net>
10 * @copyright (c) 2013, Michael Roterman
11 * @version 0.0.1
12 */
13namespace Tmdb\Tests;
14
15class RequestTokenTest extends \PHPUnit_Framework_TestCase
16{
17    const REQUEST_TOKEN = '641bf16c663db167c6cffcdff41126039d4445bf';
18
19    /**
20     * @test
21     */
22    public function testSetGet()
23    {
24        $token  = new \Tmdb\RequestToken();
25        $token->setToken(self::REQUEST_TOKEN);
26        $token->setExpiresAt('2012-02-09 19:50:25 UTC');
27        $token->setSuccess(true);
28
29        $this->assertEquals(self::REQUEST_TOKEN, $token->getToken());
30        $this->assertInstanceOf('DateTime', $token->getExpiresAt());
31        $this->assertEquals(true, $token->getSuccess());
32        $this->assertEquals(self::REQUEST_TOKEN, (string) $token);
33    }
34}
35