<?php
namespace NumbersPHP\Tests;

use NumbersPHP\Generators;

/**
 * Generated by PHPUnit_SkeletonGenerator 1.2.0 on 2013-02-25 at 11:20:02.
 */
class GeneratorsTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var Generators
     */
    protected $object;

    /**
     * Sets up the fixture, for example, opens a network connection.
     * This method is called before a test is executed.
     */
    protected function setUp()
    {
        $this->object = new Generators;
    }

    /**
     * Tears down the fixture, for example, closes a network connection.
     * This method is called after a test is executed.
     */
    protected function tearDown()
    {
    }

    /**
     * @covers NumbersPHP\Generators::fibonacci
     */
    public function testFibonacci()
    {
        $this->assertEquals(55, \NumbersPHP\Generators::fibonacci(10));

        $this->assertEquals(12586269025, \NumbersPHP\Generators::fibonacci(50));

        $this->assertEquals(14472334024676221, \NumbersPHP\Generators::fibonacci(79));
    }

    /**
     * @covers NumbersPHP\Generators::collatz
     */
    public function testCollatz()
    {
        $result = array();
        \NumbersPHP\Generators::collatz(7, $result);
        $this->assertEquals(array(7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1), $result);
    }
}
