</notes>
XML;
- Notification::rawContent(['extension' => 'xml']);
+ $notification = new Notification(['extension' => 'xml']);
+ $notification->rawContent();
self::assertXmlStringEqualsXmlString($assertXml, ApiResponseDouble::getOutput());
}
public function testWithJsonResult()
{
- Notification::rawContent(['parameter' => 'json']);
+ $notification = new Notification(['parameter' => 'json']);
+ $notification->rawContent();
$result = json_encode(ApiResponseDouble::getOutput());
public function testEmpty()
{
$this->expectException(BadRequestException::class);
- Delete::rawContent();
+ (new Delete())->rawContent();
}
public function testWithoutAuthenticatedUser()
public function testWrong()
{
$this->expectException(BadRequestException::class);
- Delete::rawContent(['photo_id' => 1]);
+ (new Delete(['photo_id' => 1]))->rawContent();
}
public function testWithCorrectPhotoId()
public function testEmpty()
{
$this->expectException(BadRequestException::class);
- Delete::rawContent();
+ (new Delete())->rawContent();
}
public function testWrong()
{
$this->expectException(BadRequestException::class);
- Delete::rawContent(['album' => 'album_name']);
+ (new Delete(['album' => 'album_name']))->rawContent();
}
public function testValid()
public function testEmpty()
{
$this->expectException(BadRequestException::class);
- Update::rawContent();
+ (new Update())->rawContent();
}
public function testTooFewArgs()
{
$this->expectException(BadRequestException::class);
- Update::rawContent(['album' => 'album_name']);
+ (new Update(['album' => 'album_name']))->rawContent();
}
public function testWrongUpdate()
{
$this->expectException(BadRequestException::class);
- Update::rawContent(['album' => 'album_name', 'album_new' => 'album_name']);
+ (new Update(['album' => 'album_name', 'album_new' => 'album_name']))->rawContent();
}
public function testWithoutAuthenticatedUser()
{
public function test()
{
- Version::rawContent(['extension' => 'json']);
+ $version = new Version(['extension' => 'json']);
+ $version->rawContent();
$result = json_decode(ApiResponseDouble::getOutput());
{
public function testJson()
{
- Test::rawContent(['extension' => 'json']);
+ $test = new Test(['extension' => 'json']);
+ $test->rawContent();
self::assertEquals('"ok"', ApiResponseDouble::getOutput());
}
public function testXml()
{
- Test::rawContent(['extension' => 'xml']);
+ $test = new Test(['extension' => 'xml']);
+ $test->rawContent();
self::assertxml(ApiResponseDouble::getOutput(), 'ok');
}
{
public function testWithJson()
{
- RateLimitStatus::rawContent(['extension' => 'json']);
+ $rateLimitStatus = new RateLimitStatus(['extension' => 'json']);
+ $rateLimitStatus->rawContent();
$result = json_decode(ApiResponseDouble::getOutput());
public function testWithXml()
{
- RateLimitStatus::rawContent(['extension' => 'xml']);
+ $rateLimitStatus = new RateLimitStatus(['extension' => 'xml']);
+ $rateLimitStatus->rawContent();
self::assertXml(ApiResponseDouble::getOutput(), 'hash');
}
{
public function test()
{
- SavedSearches::rawContent(['extension' => 'json']);
+ $savedSearch = new SavedSearches(['extension' => 'json']);
+ $savedSearch->rawContent();
$result = json_decode(ApiResponseDouble::getOutput());