Commit c6e430a8 authored by Avtandil Kikabidze's avatar Avtandil Kikabidze

Improved Tests folder structure

parent 2bc325e0
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
}, },
"autoload-dev": { "autoload-dev": {
"psr-4": { "psr-4": {
"Longman\\TelegramBot\\Tests\\": "tests/TelegramBot/Tests" "Longman\\TelegramBot\\Tests\\Unit\\": "tests/unit"
} }
}, },
"require-dev": { "require-dev": {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<phpunit <phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd" xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
bootstrap="./tests/Bootstrap.php" bootstrap="./tests/bootstrap.php"
backupGlobals="false" backupGlobals="false"
backupStaticAttributes="false" backupStaticAttributes="false"
colors="true" colors="true"
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
namespace Longman\TelegramBot\Tests;
/* /*
* Set error reporting to the max level. * Set error reporting to the max level.
*/ */
...@@ -26,7 +24,7 @@ $autoloader = __DIR__ . '/../vendor/autoload.php'; ...@@ -26,7 +24,7 @@ $autoloader = __DIR__ . '/../vendor/autoload.php';
* Check that --dev composer installation was done * Check that --dev composer installation was done
*/ */
if (!file_exists($autoloader)) { if (!file_exists($autoloader)) {
throw new \Exception( throw new Exception(
'Please run "php composer.phar install --dev" in root directory ' 'Please run "php composer.phar install --dev" in root directory '
. 'to setup unit test dependencies before running the tests' . 'to setup unit test dependencies before running the tests'
); );
......
...@@ -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 Longman\TelegramBot\Tests\Commands; namespace Longman\TelegramBot\Tests\Unit\Commands;
use Longman\TelegramBot\Tests\TestCase; use Longman\TelegramBot\Tests\Unit\TestCase;
use Longman\TelegramBot\Tests\TestHelpers; use Longman\TelegramBot\Tests\Unit\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 Longman\TelegramBot\Tests\Commands; namespace Longman\TelegramBot\Tests\Unit\Commands;
use Longman\TelegramBot\Tests\TestCase; use Longman\TelegramBot\Tests\Unit\TestCase;
use Longman\TelegramBot\Telegram; use Longman\TelegramBot\Telegram;
/** /**
......
...@@ -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 Longman\TelegramBot\Tests\Commands\UserCommands; namespace Longman\TelegramBot\Tests\Unit\Commands\UserCommands;
use Longman\TelegramBot\Tests\Commands\CommandTestCase; use Longman\TelegramBot\Tests\Unit\Commands\CommandTestCase;
use Longman\TelegramBot\Tests\TestHelpers; use Longman\TelegramBot\Tests\Unit\TestHelpers;
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 Longman\TelegramBot\Tests\Commands\UserCommands; namespace Longman\TelegramBot\Tests\Unit\Commands\UserCommands;
use Longman\TelegramBot\Tests\Commands\CommandTestCase; use Longman\TelegramBot\Tests\Unit\Commands\CommandTestCase;
use Longman\TelegramBot\Tests\TestHelpers; use Longman\TelegramBot\Tests\Unit\TestHelpers;
use Longman\TelegramBot\Commands\UserCommands\HelpCommand; use Longman\TelegramBot\Commands\UserCommands\HelpCommand;
/** /**
......
...@@ -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 Longman\TelegramBot\Tests; namespace Longman\TelegramBot\Tests\Unit;
use Longman\TelegramBot\Conversation; use Longman\TelegramBot\Conversation;
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 Longman\TelegramBot\Tests; namespace Longman\TelegramBot\Tests\Unit;
/** /**
* @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 Longman\TelegramBot\Tests; namespace Longman\TelegramBot\Tests\Unit;
use Longman\TelegramBot\Entities\InlineKeyboardButton; use Longman\TelegramBot\Entities\InlineKeyboardButton;
......
...@@ -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 Longman\TelegramBot\Tests; namespace Longman\TelegramBot\Tests\Unit;
/** /**
* @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 Longman\TelegramBot\Tests; namespace Longman\TelegramBot\Tests\Unit;
use \Longman\TelegramBot\Entities\Update; use \Longman\TelegramBot\Entities\Update;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* Written by Marco Boretto * Written by Marco Boretto
*/ */
namespace Longman\TelegramBot\Tests; namespace Longman\TelegramBot\Tests\Unit;
use \Longman\TelegramBot\Entities\ServerResponse; use \Longman\TelegramBot\Entities\ServerResponse;
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 Longman\TelegramBot\Tests; namespace Longman\TelegramBot\Tests\Unit;
use \Longman\TelegramBot\Entities\Update; use \Longman\TelegramBot\Entities\Update;
......
...@@ -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 Longman\TelegramBot\Tests; namespace Longman\TelegramBot\Tests\Unit;
use Longman\TelegramBot\TelegramLog; use Longman\TelegramBot\TelegramLog;
use Monolog\Handler\StreamHandler; use Monolog\Handler\StreamHandler;
......
...@@ -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 Longman\TelegramBot\Tests; namespace Longman\TelegramBot\Tests\Unit;
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 Longman\TelegramBot\Tests; namespace Longman\TelegramBot\Tests\Unit;
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 Longman\TelegramBot\Tests; namespace Longman\TelegramBot\Tests\Unit;
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