Commit 4ce7fa5a authored by Tibo's avatar Tibo

Add tests

parent 4ea365ee
Pipeline #2138 failed with stage
in 19 seconds
auxiliary.org-netbeans-modules-php-phpunit.bootstrap_2e_create_2e_tests=false
auxiliary.org-netbeans-modules-php-phpunit.bootstrap_2e_enabled=false
auxiliary.org-netbeans-modules-php-phpunit.bootstrap_2e_path=
auxiliary.org-netbeans-modules-php-phpunit.configuration_2e_enabled=false
auxiliary.org-netbeans-modules-php-phpunit.configuration_2e_path=
auxiliary.org-netbeans-modules-php-phpunit.configuration_2e_enabled=true
auxiliary.org-netbeans-modules-php-phpunit.configuration_2e_path=phpunit.xml
auxiliary.org-netbeans-modules-php-phpunit.customSuite_2e_enabled=false
auxiliary.org-netbeans-modules-php-phpunit.customSuite_2e_path=
auxiliary.org-netbeans-modules-php-phpunit.phpUnit_2e_enabled=false
......
......@@ -43,7 +43,16 @@ class DatasetTest extends TestCase
public function testSortByKey()
{
$data = new Dataset([new Tuple(1, 1), new Tuple(0, 0), new Tuple(2, 2)]);
$data = new Dataset(
[new Tuple(1, 1), new Tuple(0, 0), new Tuple(3, 3), new Tuple(2, 2)]);
$this->assertEquals(0, $data->sortByKey()->first()->value);
$this->assertEquals(3, $data->sortByKey(false)->first()->value);
}
public function testCollect()
{
$data = new Dataset([1, 2, 3, 4]);
$this->assertEquals(4, count($data->collect()));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment