From 667493a3960934361045cce14ac979b0d3f37cf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Bru=CC=88ckner?= Date: Mon, 22 Jun 2020 09:13:06 +0200 Subject: [PATCH] Adds unit test for new method DbSelect::getArrayCopy() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Brückner --- test/Adapter/DbSelectTest.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/Adapter/DbSelectTest.php b/test/Adapter/DbSelectTest.php index 653ca7aa..a2eb20d7 100644 --- a/test/Adapter/DbSelectTest.php +++ b/test/Adapter/DbSelectTest.php @@ -108,4 +108,21 @@ public function testReturnValueIsArray() { $this->assertInternalType('array', $this->dbSelect->getItems(0, 10)); } + + public function testGetArrayCopyShouldContainSelectItems() + { + $this->dbSelect = new DbSelect( + $this->mockSelect, + $this->mockSql, + null, + $this->mockSelectCount + ); + $this->assertSame( + [ + 'select', + 'count_select', + ], + array_keys($this->dbSelect->getArrayCopy()) + ); + } }