From c5802196271bd56e58f5914799f3a99f2da41d55 Mon Sep 17 00:00:00 2001 From: Eugene Molotov Date: Sat, 5 Jun 2021 09:19:07 +0500 Subject: [PATCH] [BridgeImplementationTest] Implement feature for testing detectParameters method --- lib/BridgeAbstract.php | 5 +++++ tests/BridgeImplementationTest.php | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/lib/BridgeAbstract.php b/lib/BridgeAbstract.php index ee885bf9..6158e3b9 100644 --- a/lib/BridgeAbstract.php +++ b/lib/BridgeAbstract.php @@ -75,6 +75,11 @@ abstract class BridgeAbstract implements BridgeInterface { */ const PARAMETERS = array(); + /** + * Test cases for detectParameters for the bridge + */ + const TEST_DETECT_PARAMETERS = array(); + /** * Holds the list of items collected by the bridge * diff --git a/tests/BridgeImplementationTest.php b/tests/BridgeImplementationTest.php index 9b74f20e..3d4d1f6c 100644 --- a/tests/BridgeImplementationTest.php +++ b/tests/BridgeImplementationTest.php @@ -135,6 +135,10 @@ class BridgeImplementationTest extends TestCase { } } + foreach($this->obj::TEST_DETECT_PARAMETERS as $url => $params) { + $this->assertEquals($this->obj->detectParameters($url), $params); + } + $this->assertTrue(true); }