From dc8bb8c0ed4ab14d0faef773acc258e5a6e6b350 Mon Sep 17 00:00:00 2001 From: Pavel Date: Wed, 19 Jun 2019 12:03:37 +0300 Subject: [PATCH] Default .env.dist values for tests --- .env.dist | 2 +- Makefile | 4 ++++ test-report.xml | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 test-report.xml diff --git a/.env.dist b/.env.dist index 163c9a3..15e3584 100644 --- a/.env.dist +++ b/.env.dist @@ -1,3 +1,3 @@ -MG_BOT_URL="" +MG_BOT_URL="https://mg-test.retailcrm.pro/" MG_BOT_KEY="" MG_BOT_DBG="" diff --git a/Makefile b/Makefile index e0c55b5..4a14a4c 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,10 @@ deps: test: @echo "==> Running tests" @cd $(ROOT_DIR) +ifeq ($(wildcard .env), ) + @echo "==> Creating .env file for testing purposes..." + @cp .env.dist .env +endif @php -d memory_limit=-1 $(BIN_DIR)/phpunit -c phpunit.xml.dist --log-junit $(ROOT_DIR)/test-report.xml @echo "==> Testing complete" diff --git a/test-report.xml b/test-report.xml new file mode 100644 index 0000000..12a8563 --- /dev/null +++ b/test-report.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + RetailCrm\Mg\Bot\Tests\CommandsTest::testCommandEditException +Failed asserting that exception of type "Exception" matches expected exception "InvalidArgumentException". Message was: "Method not found " at +/home/pavel/mg-bots/mg-bot-api-client-php/src/Bot/HttpClient.php:169 +/home/pavel/mg-bots/mg-bot-api-client-php/src/Bot/Client.php:88 +/home/pavel/mg-bots/mg-bot-api-client-php/src/Bot/Client.php:254 +/home/pavel/mg-bots/mg-bot-api-client-php/tests/Bot/Tests/CommandsTest.php:46 +. + + + + + + RetailCrm\Mg\Bot\Tests\CommandsTest::testCommandEdit +LazyJsonMapper\Exception\LazyJsonMapperException: Unknown function "isSuccessful". + +/home/pavel/mg-bots/mg-bot-api-client-php/vendor/lazyjsonmapper/lazyjsonmapper/src/LazyJsonMapper.php:2156 +/home/pavel/mg-bots/mg-bot-api-client-php/tests/Bot/Tests/CommandsTest.php:79 + + + + + + + + + RetailCrm\Mg\Bot\Tests\MessagesTest::testMessageSend +LazyJsonMapper\Exception\LazyJsonMapperException: Unknown function "getStatusCode". + +/home/pavel/mg-bots/mg-bot-api-client-php/vendor/lazyjsonmapper/lazyjsonmapper/src/LazyJsonMapper.php:2156 +/home/pavel/mg-bots/mg-bot-api-client-php/tests/Bot/Tests/MessagesTest.php:47 + + + + +