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
a9ceaf31
Unverified
Commit
a9ceaf31
authored
Mar 09, 2019
by
Armando Lüscher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests for current_action memory in Request class.
parent
2499c613
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
ServerResponseTest.php
tests/unit/Entities/ServerResponseTest.php
+9
-0
No files found.
tests/unit/Entities/ServerResponseTest.php
View file @
a9ceaf31
...
@@ -25,6 +25,12 @@ use Longman\TelegramBot\Request;
...
@@ -25,6 +25,12 @@ use Longman\TelegramBot\Request;
*/
*/
class
ServerResponseTest
extends
TestCase
class
ServerResponseTest
extends
TestCase
{
{
protected
function
setUp
()
{
// Make sure the current action in the Request class is unset.
TestHelpers
::
setStaticProperty
(
Request
::
class
,
'current_action'
,
null
);
}
public
function
sendMessageOk
()
public
function
sendMessageOk
()
{
{
return
'{
return
'{
...
@@ -193,6 +199,7 @@ class ServerResponseTest extends TestCase
...
@@ -193,6 +199,7 @@ class ServerResponseTest extends TestCase
public
function
getUserProfilePhotos
()
public
function
getUserProfilePhotos
()
{
{
TestHelpers
::
setStaticProperty
(
Request
::
class
,
'current_action'
,
'getUserProfilePhotos'
);
return
'{
return
'{
"ok":true,
"ok":true,
"result":{
"result":{
...
@@ -238,6 +245,7 @@ class ServerResponseTest extends TestCase
...
@@ -238,6 +245,7 @@ class ServerResponseTest extends TestCase
public
function
getFile
()
public
function
getFile
()
{
{
TestHelpers
::
setStaticProperty
(
Request
::
class
,
'current_action'
,
'getFile'
);
return
'{
return
'{
"ok":true,
"ok":true,
"result":{
"result":{
...
@@ -301,6 +309,7 @@ class ServerResponseTest extends TestCase
...
@@ -301,6 +309,7 @@ class ServerResponseTest extends TestCase
public
function
getStickerSet
()
public
function
getStickerSet
()
{
{
TestHelpers
::
setStaticProperty
(
Request
::
class
,
'current_action'
,
'getStickerSet'
);
return
'{
return
'{
"ok":true,
"ok":true,
"result":{
"result":{
...
...
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