Sha256: d102da4fbdcdc05e6071205dbf8afa9e888ab0b68a34ba90b5760c7b93c9d345

Contents?: true

Size: 1.04 KB

Versions: 211

Compression:

Stored size: 1.04 KB

Contents

<?php
require_once "prime-factors.php";

class PrimeFactorsTest extends PHPUnit\Framework\TestCase
{
    public function testNoFactors()
    {
        $this->assertSame([], factors(1));
    }

    public function testOneFactor()
    {
        $this->markTestSkipped();
        $this->assertSame([2], factors(2));
    }

    public function testSquareOfPrime()
    {
        $this->markTestSkipped();
        $this->assertSame([3, 3], factors(9));
    }

    public function testCubeOfPrime()
    {
        $this->markTestSkipped();
        $this->assertSame([2, 2, 2], factors(8));
    }

    public function testProductOfPrimesAndNon()
    {
        $this->markTestSkipped();
        $this->assertEquals([2, 2, 3], factors(12));
    }

    public function testProductOfPrimes()
    {
        $this->markTestSkipped();
        $this->assertEquals([5, 17, 23, 461], factors(901255));
    }

    public function testFactorsIncludeLargePrime()
    {
        $this->markTestSkipped();
        $this->assertEquals([11, 9539, 894119], factors(93819012551));
    }
}

Version data entries

211 entries across 211 versions & 1 rubygems

Version Path
trackler-2.2.1.139 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.138 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.137 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.136 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.135 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.134 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.133 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.132 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.131 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.130 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.129 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.128 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.127 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.126 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.125 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.124 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.123 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.122 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.121 tracks/php/exercises/prime-factors/prime-factors_test.php
trackler-2.2.1.120 tracks/php/exercises/prime-factors/prime-factors_test.php