From 0976e1703015291a868f5ea29d5a9e9cac31262f Mon Sep 17 00:00:00 2001 From: Pitchaya Boonsarngsuk Date: Wed, 19 Dec 2018 21:06:37 +0000 Subject: [PATCH] Sample test --- .idea/php-test-framework.xml | 14 ++++++++++++++ .idea/php.xml | 9 +++++++++ src/entryPoint.php | 30 +++++++++++++++--------------- src/repl.php | 32 ++++++++++++++++---------------- test/Test.php | 21 +++++++++++++++++++++ 5 files changed, 75 insertions(+), 31 deletions(-) create mode 100644 .idea/php-test-framework.xml create mode 100644 .idea/php.xml create mode 100644 test/Test.php diff --git a/.idea/php-test-framework.xml b/.idea/php-test-framework.xml new file mode 100644 index 0000000..c20ee25 --- /dev/null +++ b/.idea/php-test-framework.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 0000000..4ca683a --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/entryPoint.php b/src/entryPoint.php index c1d1184..dbf9e89 100644 --- a/src/entryPoint.php +++ b/src/entryPoint.php @@ -1,16 +1,16 @@ - ' , reply_user($room_id, $msg_id, $trimmed) , "\n"; - $msg_id++; + ' , reply_user($room_id, $msg_id, $trimmed) , "\n"; + $msg_id++; } while($trimmed !== "exit"); \ No newline at end of file diff --git a/test/Test.php b/test/Test.php new file mode 100644 index 0000000..92f65fe --- /dev/null +++ b/test/Test.php @@ -0,0 +1,21 @@ +assertEquals( + '0', + reply_user('whatever', 0, 'whatever') + ); + } +}