1
exercism fetch php nth-prime

nth-prime_test.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php

require 'nth-prime.php';

class NthPrimeTest extends PHPUnit\Framework\TestCase
{
    public function testFirstPrime()
    {
        $this->assertEquals(2, prime(1));
    }
    public function testSecondPrime()
    {
        $this->markTestSkipped();
        $this->assertEquals(3, prime(2));
    }
    public function testSixthPrime()
    {
        $this->markTestSkipped();
        $this->assertEquals(13, prime(6));
    }
    public function testBigPrime()
    {
        $this->markTestSkipped();
        $this->assertEquals(104743, prime(10001));
    }
    public function testZeroPrime()
    {
        $this->markTestSkipped();
        $this->assertEquals(false, prime(0));
    }
}