Commit 187abc3f authored by Armando Lüscher's avatar Armando Lüscher Committed by GitHub

Merge pull request #285 from noplanman/restructure_tests

Move all tests into a dedicated namespace and folder.
parents 9af785f8 27f55ca6
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
}, },
"autoload-dev": { "autoload-dev": {
"psr-4": { "psr-4": {
"Tests\\": "tests/" "Longman\\TelegramBot\\Tests\\": "tests/TelegramBot/Tests"
} }
}, },
"require-dev": { "require-dev": {
......
This diff is collapsed.
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Tests; namespace Longman\TelegramBot\Tests;
/* /*
* Set error reporting to the max level. * Set error reporting to the max level.
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Tests\Unit\Commands; namespace Longman\TelegramBot\Tests\Commands;
use Tests\Unit\TestCase; use Longman\TelegramBot\Tests\TestCase;
use Tests\TestHelpers; use Longman\TelegramBot\Tests\TestHelpers;
use Longman\TelegramBot\Telegram; use Longman\TelegramBot\Telegram;
/** /**
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Tests\Unit\Commands; namespace Longman\TelegramBot\Tests\Commands;
use Tests\Unit\TestCase; use Longman\TelegramBot\Tests\TestCase;
use Longman\TelegramBot\Telegram; use Longman\TelegramBot\Telegram;
/** /**
......
...@@ -8,11 +8,10 @@ ...@@ -8,11 +8,10 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Tests\Unit\Commands\UserCommands; namespace Longman\TelegramBot\Tests\Commands\UserCommands;
use Tests\Unit\Commands\CommandTestCase; use Longman\TelegramBot\Tests\Commands\CommandTestCase;
use Tests\TestHelpers; use Longman\TelegramBot\Tests\TestHelpers;
use Longman\TelegramBot\Telegram;
use Longman\TelegramBot\Commands\UserCommands\EchoCommand; use Longman\TelegramBot\Commands\UserCommands\EchoCommand;
/** /**
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Tests\Unit\Commands\UserCommands; namespace Longman\TelegramBot\Tests\Commands\UserCommands;
use Tests\Unit\Commands\CommandTestCase; use Longman\TelegramBot\Tests\Commands\CommandTestCase;
use Tests\TestHelpers; use Longman\TelegramBot\Tests\TestHelpers;
use Longman\TelegramBot\Commands\UserCommands\HelpCommand; use Longman\TelegramBot\Commands\UserCommands\HelpCommand;
/** /**
......
...@@ -8,9 +8,8 @@ ...@@ -8,9 +8,8 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Tests\Unit; namespace Longman\TelegramBot\Tests;
use Tests\TestHelpers;
use Longman\TelegramBot\Conversation; use Longman\TelegramBot\Conversation;
use Longman\TelegramBot\Telegram; use Longman\TelegramBot\Telegram;
......
...@@ -8,10 +8,7 @@ ...@@ -8,10 +8,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Tests\Unit; namespace Longman\TelegramBot\Tests;
use Longman\TelegramBot\Entities\Chat;
use Tests\TestHelpers;
/** /**
* @package TelegramTest * @package TelegramTest
......
...@@ -8,10 +8,9 @@ ...@@ -8,10 +8,9 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Tests\Unit; namespace Longman\TelegramBot\Tests;
use Longman\TelegramBot\Entities\InlineKeyboardButton; use Longman\TelegramBot\Entities\InlineKeyboardButton;
use Longman\TelegramBot\Exception\TelegramException;
/** /**
* @package TelegramTest * @package TelegramTest
......
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Tests\Unit; namespace Longman\TelegramBot\Tests;
use Tests\TestHelpers;
/** /**
* @package TelegramTest * @package TelegramTest
......
...@@ -8,10 +8,9 @@ ...@@ -8,10 +8,9 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Tests\Unit; namespace Longman\TelegramBot\Tests;
use \Longman\TelegramBot\Entities\Update; use \Longman\TelegramBot\Entities\Update;
use \Longman\TelegramBot\Entities\ReplyToMessage;
/** /**
* @package TelegramTest * @package TelegramTest
......
...@@ -10,10 +10,9 @@ ...@@ -10,10 +10,9 @@
* Written by Marco Boretto * Written by Marco Boretto
*/ */
namespace Tests\Unit; namespace Longman\TelegramBot\Tests;
use \Longman\TelegramBot\Entities\ServerResponse; use \Longman\TelegramBot\Entities\ServerResponse;
use \Longman\TelegramBot\Entities\Message;
use \Longman\TelegramBot\Request; use \Longman\TelegramBot\Request;
/** /**
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Tests\Unit; namespace Longman\TelegramBot\Tests;
use \Longman\TelegramBot\Entities\Update; use \Longman\TelegramBot\Entities\Update;
......
...@@ -8,13 +8,11 @@ ...@@ -8,13 +8,11 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Tests\Unit; namespace Longman\TelegramBot\Tests;
use Longman\TelegramBot\Exception\TelegramLogException;
use Longman\TelegramBot\TelegramLog; use Longman\TelegramBot\TelegramLog;
use Monolog\Handler\StreamHandler; use Monolog\Handler\StreamHandler;
use Monolog\Logger; use Monolog\Logger;
use Tests\TestHelpers;
/** /**
* @package TelegramTest * @package TelegramTest
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Tests\Unit; namespace Longman\TelegramBot\Tests;
use Longman\TelegramBot\Telegram; use Longman\TelegramBot\Telegram;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Tests\Unit; namespace Longman\TelegramBot\Tests;
class TestCase extends \PHPUnit_Framework_TestCase class TestCase extends \PHPUnit_Framework_TestCase
{ {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Tests; namespace Longman\TelegramBot\Tests;
use Longman\TelegramBot\DB; use Longman\TelegramBot\DB;
use Longman\TelegramBot\Entities\Chat; use Longman\TelegramBot\Entities\Chat;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment