Skip to content

Commit

Permalink
Improved Tests folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
akalongman committed Aug 23, 2016
1 parent 2bc325e commit c6e430a
Show file tree
Hide file tree
Showing 18 changed files with 25 additions and 27 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -31,7 +31,7 @@
},
"autoload-dev": {
"psr-4": {
"Longman\\TelegramBot\\Tests\\": "tests/TelegramBot/Tests"
"Longman\\TelegramBot\\Tests\\Unit\\": "tests/unit"
}
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Expand Up @@ -2,7 +2,7 @@
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
bootstrap="./tests/Bootstrap.php"
bootstrap="./tests/bootstrap.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
Expand Down
4 changes: 1 addition & 3 deletions tests/Bootstrap.php → tests/bootstrap.php
Expand Up @@ -8,8 +8,6 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Tests;

/*
* Set error reporting to the max level.
*/
Expand All @@ -26,7 +24,7 @@
* Check that --dev composer installation was done
*/
if (!file_exists($autoloader)) {
throw new \Exception(
throw new Exception(
'Please run "php composer.phar install --dev" in root directory '
. 'to setup unit test dependencies before running the tests'
);
Expand Down
Expand Up @@ -8,10 +8,10 @@
* 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\TestHelpers;
use Longman\TelegramBot\Tests\Unit\TestCase;
use Longman\TelegramBot\Tests\Unit\TestHelpers;
use Longman\TelegramBot\Telegram;

/**
Expand Down
Expand Up @@ -8,9 +8,9 @@
* 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;

/**
Expand Down
Expand Up @@ -8,10 +8,10 @@
* 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\TestHelpers;
use Longman\TelegramBot\Tests\Unit\Commands\CommandTestCase;
use Longman\TelegramBot\Tests\Unit\TestHelpers;
use Longman\TelegramBot\Commands\UserCommands\EchoCommand;

/**
Expand Down
Expand Up @@ -8,10 +8,10 @@
* 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\TestHelpers;
use Longman\TelegramBot\Tests\Unit\Commands\CommandTestCase;
use Longman\TelegramBot\Tests\Unit\TestHelpers;
use Longman\TelegramBot\Commands\UserCommands\HelpCommand;

/**
Expand Down
Expand Up @@ -8,7 +8,7 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Tests;
namespace Longman\TelegramBot\Tests\Unit;

use Longman\TelegramBot\Conversation;
use Longman\TelegramBot\Telegram;
Expand Down
Expand Up @@ -8,7 +8,7 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Tests;
namespace Longman\TelegramBot\Tests\Unit;

/**
* @package TelegramTest
Expand Down
Expand Up @@ -8,7 +8,7 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Tests;
namespace Longman\TelegramBot\Tests\Unit;

use Longman\TelegramBot\Entities\InlineKeyboardButton;

Expand Down
Expand Up @@ -8,7 +8,7 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Tests;
namespace Longman\TelegramBot\Tests\Unit;

/**
* @package TelegramTest
Expand Down
Expand Up @@ -8,7 +8,7 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Tests;
namespace Longman\TelegramBot\Tests\Unit;

use \Longman\TelegramBot\Entities\Update;

Expand Down
Expand Up @@ -10,7 +10,7 @@
* Written by Marco Boretto
*/

namespace Longman\TelegramBot\Tests;
namespace Longman\TelegramBot\Tests\Unit;

use \Longman\TelegramBot\Entities\ServerResponse;
use \Longman\TelegramBot\Request;
Expand Down
Expand Up @@ -8,7 +8,7 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Tests;
namespace Longman\TelegramBot\Tests\Unit;

use \Longman\TelegramBot\Entities\Update;

Expand Down
Expand Up @@ -8,7 +8,7 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Tests;
namespace Longman\TelegramBot\Tests\Unit;

use Longman\TelegramBot\TelegramLog;
use Monolog\Handler\StreamHandler;
Expand Down
Expand Up @@ -8,7 +8,7 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Tests;
namespace Longman\TelegramBot\Tests\Unit;

use Longman\TelegramBot\Telegram;

Expand Down
Expand Up @@ -8,7 +8,7 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Tests;
namespace Longman\TelegramBot\Tests\Unit;

class TestCase extends \PHPUnit_Framework_TestCase
{
Expand Down
Expand Up @@ -8,7 +8,7 @@
* file that was distributed with this source code.
*/

namespace Longman\TelegramBot\Tests;
namespace Longman\TelegramBot\Tests\Unit;

use Longman\TelegramBot\DB;
use Longman\TelegramBot\Entities\Chat;
Expand Down

0 comments on commit c6e430a

Please sign in to comment.