public function testFactorial() { $this->assertEquals(5 * 4 * 3 * 2, Math::factorial(5)); $this->assertEquals(Math::factorial(8) * 9, Math::factorial(9)); }
/** * @covers h4kuna\Math::factorial * @todo Implement testFactorial(). */ public function testFactorial() { $this->assertSame(120, Math::factorial(5)); $this->setExpectedException('h4kuna\\DataType\\InvalidArgumentsException'); Math::factorial(-1); }
public function testFactorialWeak() { $this->assertEquals(4 * 3 * 2, Math::factorial("4")); }