From 68f3ecc6f9fe13811946763d7bbe1debdf693eba Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 17 Oct 2019 10:50:18 +0200 Subject: [PATCH] Add trivial test case --- tests/Algorithm/Sort/BucketSortTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/Algorithm/Sort/BucketSortTest.php b/tests/Algorithm/Sort/BucketSortTest.php index 8e7c3e719..f53b28590 100644 --- a/tests/Algorithm/Sort/BucketSortTest.php +++ b/tests/Algorithm/Sort/BucketSortTest.php @@ -70,4 +70,10 @@ class BucketSortTest extends \PHPUnit\Framework\TestCase [5, 1, 4, 2, 8], [$this->list[0]->value, $this->list[1]->value, $this->list[2]->value, $this->list[3]->value, $this->list[4]->value,] ); } + + public function testNoBuckets() : void + { + $newList = BucketSort::sort($this->list, 0, \phpOMS\Algorithm\Sort\SelectionSort::class); + self::assertEquals([], $newList); + } }