Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Tweaks and Mocks
Fixed bad parameter Added a all-ok mock for dev environments
- Loading branch information
Showing
3 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
|
||
"autoload": { | ||
"psr-0": { | ||
"DMS": "src/" | ||
"DMS": ["src/", "tests/"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
tests/DMS/Service/Superfeedr/MockClient/AllSuccessMockClient.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace DMS\Service\Superfeedr\MockClient; | ||
|
||
use DMS\Service\Superfeedr\SuperfeedrClient; | ||
use Guzzle\Http\Message\Response; | ||
|
||
class AllSuccessMockClient extends SuperfeedrClient | ||
{ | ||
public function subscribeFeed($feed, $callbackUrl, $format = 'ATOM') | ||
{ | ||
return new Response(200); | ||
} | ||
|
||
public function unsubscribeFeed($feed, $callbackUrl = null) | ||
{ | ||
return new Response(200); | ||
} | ||
|
||
public function listFeeds($callbackUrl, $page = 1) | ||
{ | ||
return new Response(200); | ||
} | ||
|
||
public function retrieveFeeds($feed, array $config = []) | ||
{ | ||
return new Response(200); | ||
} | ||
|
||
public function validateRequest($signature, $content) | ||
{ | ||
return true; | ||
} | ||
|
||
} |