2015-11-19 01:58:22 +01:00
|
|
|
<?php
|
|
|
|
namespace Slim {
|
|
|
|
class Response extends \Mock {
|
|
|
|
protected static $instance;
|
2016-04-08 01:54:47 +02:00
|
|
|
|
2015-11-19 01:58:22 +01:00
|
|
|
public function __construct() {}
|
|
|
|
|
|
|
|
public static function getInstance() {
|
2016-04-08 01:54:47 +02:00
|
|
|
if (self::$instance === null) {
|
2015-11-19 01:58:22 +01:00
|
|
|
self::$instance = new \Mock();
|
|
|
|
self::$instance->setBody = \Mock::stub();
|
2016-01-15 03:45:22 +01:00
|
|
|
self::$instance->finalize = \Mock::stub();
|
2015-11-19 01:58:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return self::$instance;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class Slim extends \Mock {
|
|
|
|
protected static $instance;
|
2016-04-08 01:54:47 +02:00
|
|
|
|
|
|
|
public function __construct() {
|
|
|
|
}
|
2015-11-19 01:58:22 +01:00
|
|
|
|
|
|
|
public static function getInstance() {
|
2016-04-08 01:54:47 +02:00
|
|
|
if (self::$instance === null) {
|
2015-11-19 01:58:22 +01:00
|
|
|
self::$instance = new Slim();
|
|
|
|
self::$instance->response = \Mock::stub()->returns(Response::getInstance());
|
|
|
|
}
|
|
|
|
|
|
|
|
return self::$instance;
|
|
|
|
}
|
|
|
|
}
|
2016-04-08 01:54:47 +02:00
|
|
|
}
|