summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2017-02-07 10:41:10 +0100
committerMichal Čihař <michal@cihar.com>2017-02-07 10:41:10 +0100
commit2effa37a247c0264bbe16c7e0efe537c4e627a12 (patch)
tree16d4dda4db5aa901bda274271026561d91a390c9
parentbcac15ad1a42209df2a25b93c90d22cfdb949c6d (diff)
downloadsql-parser-2effa37a247c0264bbe16c7e0efe537c4e627a12.zip
sql-parser-2effa37a247c0264bbe16c7e0efe537c4e627a12.tar.gz
sql-parser-2effa37a247c0264bbe16c7e0efe537c4e627a12.tar.bz2
Test getopt() invocation as well
Signed-off-by: Michal Čihař <michal@cihar.com>
-rw-r--r--tests/Utils/CLITest.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/Utils/CLITest.php b/tests/Utils/CLITest.php
index 435a2c8..fb4ee23 100644
--- a/tests/Utils/CLITest.php
+++ b/tests/Utils/CLITest.php
@@ -15,6 +15,22 @@ class CLITest extends TestCase
}
/**
+ * Test that getopt call works
+ *
+ * We do mock it for other tests to return values we want.
+ *
+ * @return void
+ */
+ public function testGetopt()
+ {
+ $cli = new \PhpMyAdmin\SqlParser\Utils\CLI();
+ $this->assertEquals(
+ $cli->getopt('', array()),
+ array()
+ );
+ }
+
+ /**
* @dataProvider highlightParams
*/
public function testRunHighlight($getopt, $output, $result)