Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TelegramBot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
TelegramBot
Commits
c6e430a8
Commit
c6e430a8
authored
Aug 23, 2016
by
Avtandil Kikabidze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved Tests folder structure
parent
2bc325e0
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
25 additions
and
27 deletions
+25
-27
composer.json
composer.json
+1
-1
phpunit.xml.dist
phpunit.xml.dist
+1
-1
bootstrap.php
tests/bootstrap.php
+1
-3
CommandTest.php
tests/unit/Commands/CommandTest.php
+3
-3
CommandTestCase.php
tests/unit/Commands/CommandTestCase.php
+2
-2
EchoCommandTest.php
tests/unit/Commands/UserCommands/EchoCommandTest.php
+3
-3
HelpCommandTest.php
tests/unit/Commands/UserCommands/HelpCommandTest.php
+3
-3
ConversationTest.php
tests/unit/ConversationTest.php
+1
-1
ChatTest.php
tests/unit/Entities/ChatTest.php
+1
-1
InlineKeyboardButtonTest.php
tests/unit/Entities/InlineKeyboardButtonTest.php
+1
-1
MessageTest.php
tests/unit/Entities/MessageTest.php
+1
-1
ReplyToMessageTest.php
tests/unit/Entities/ReplyToMessageTest.php
+1
-1
ServerResponseTest.php
tests/unit/Entities/ServerResponseTest.php
+1
-1
UpdateTest.php
tests/unit/Entities/UpdateTest.php
+1
-1
TelegramLogTest.php
tests/unit/TelegramLogTest.php
+1
-1
TelegramTest.php
tests/unit/TelegramTest.php
+1
-1
TestCase.php
tests/unit/TestCase.php
+1
-1
TestHelpers.php
tests/unit/TestHelpers.php
+1
-1
No files found.
composer.json
View file @
c6e430a8
...
@@ -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"
:
{
...
...
phpunit.xml.dist
View file @
c6e430a8
...
@@ -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/
B
ootstrap.php"
bootstrap=
"./tests/
b
ootstrap.php"
backupGlobals=
"false"
backupGlobals=
"false"
backupStaticAttributes=
"false"
backupStaticAttributes=
"false"
colors=
"true"
colors=
"true"
...
...
tests/
B
ootstrap.php
→
tests/
b
ootstrap.php
View file @
c6e430a8
...
@@ -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'
);
);
...
...
tests/
TelegramBot/Tests
/Commands/CommandTest.php
→
tests/
unit
/Commands/CommandTest.php
View file @
c6e430a8
...
@@ -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
;
/**
/**
...
...
tests/
TelegramBot/Tests
/Commands/CommandTestCase.php
→
tests/
unit
/Commands/CommandTestCase.php
View file @
c6e430a8
...
@@ -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
;
/**
/**
...
...
tests/
TelegramBot/Tests
/Commands/UserCommands/EchoCommandTest.php
→
tests/
unit
/Commands/UserCommands/EchoCommandTest.php
View file @
c6e430a8
...
@@ -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
;
/**
/**
...
...
tests/
TelegramBot/Tests
/Commands/UserCommands/HelpCommandTest.php
→
tests/
unit
/Commands/UserCommands/HelpCommandTest.php
View file @
c6e430a8
...
@@ -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
;
/**
/**
...
...
tests/
TelegramBot/Tests
/ConversationTest.php
→
tests/
unit
/ConversationTest.php
View file @
c6e430a8
...
@@ -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
;
...
...
tests/
TelegramBot/Tests
/Entities/ChatTest.php
→
tests/
unit
/Entities/ChatTest.php
View file @
c6e430a8
...
@@ -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
...
...
tests/
TelegramBot/Tests
/Entities/InlineKeyboardButtonTest.php
→
tests/
unit
/Entities/InlineKeyboardButtonTest.php
View file @
c6e430a8
...
@@ -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
;
...
...
tests/
TelegramBot/Tests
/Entities/MessageTest.php
→
tests/
unit
/Entities/MessageTest.php
View file @
c6e430a8
...
@@ -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
...
...
tests/
TelegramBot/Tests
/Entities/ReplyToMessageTest.php
→
tests/
unit
/Entities/ReplyToMessageTest.php
View file @
c6e430a8
...
@@ -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
;
...
...
tests/
TelegramBot/Tests
/Entities/ServerResponseTest.php
→
tests/
unit
/Entities/ServerResponseTest.php
View file @
c6e430a8
...
@@ -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
;
...
...
tests/
TelegramBot/Tests
/Entities/UpdateTest.php
→
tests/
unit
/Entities/UpdateTest.php
View file @
c6e430a8
...
@@ -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
;
...
...
tests/
TelegramBot/Tests
/TelegramLogTest.php
→
tests/
unit
/TelegramLogTest.php
View file @
c6e430a8
...
@@ -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
;
...
...
tests/
TelegramBot/Tests
/TelegramTest.php
→
tests/
unit
/TelegramTest.php
View file @
c6e430a8
...
@@ -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
;
...
...
tests/
TelegramBot/Tests
/TestCase.php
→
tests/
unit
/TestCase.php
View file @
c6e430a8
...
@@ -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
{
{
...
...
tests/
TelegramBot/Tests
/TestHelpers.php
→
tests/
unit
/TestHelpers.php
View file @
c6e430a8
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment