Move API\Photo testcases

This commit is contained in:
Philipp 2021-11-12 21:12:00 +01:00
parent e477cf215d
commit f2ca21935e
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
4 changed files with 37 additions and 50 deletions

View file

@ -2,7 +2,7 @@
namespace Friendica\Test\src\Module\Api\Friendica\Photo;
use Friendica\Module\Api\Friendica\Photoalbum\Delete;
use Friendica\Module\Api\Friendica\Photo\Delete;
use Friendica\Network\HTTPException\BadRequestException;
use Friendica\Test\src\Module\Api\ApiTest;
@ -14,13 +14,18 @@ class DeleteTest extends ApiTest
Delete::rawContent();
}
public function testWithoutAuthenticatedUser()
{
self::markTestIncomplete('Needs BasicAuth as dynamic method for overriding first');
}
public function testWrong()
{
self::expectException(BadRequestException::class);
Delete::rawContent(['album' => 'album_name']);
Delete::rawContent(['photo_id' => 1]);
}
public function testValid()
public function testWithCorrectPhotoId()
{
self::markTestIncomplete('We need to add a dataset for this.');
}

View file

@ -0,0 +1,27 @@
<?php
namespace Friendica\Test\src\Module\Api\Friendica\Photoalbum;
use Friendica\Module\Api\Friendica\Photoalbum\Delete;
use Friendica\Network\HTTPException\BadRequestException;
use Friendica\Test\src\Module\Api\ApiTest;
class DeleteTest extends ApiTest
{
public function testEmpty()
{
self::expectException(BadRequestException::class);
Delete::rawContent();
}
public function testWrong()
{
self::expectException(BadRequestException::class);
Delete::rawContent(['album' => 'album_name']);
}
public function testValid()
{
self::markTestIncomplete('We need to add a dataset for this.');
}
}

View file

@ -1,6 +1,6 @@
<?php
namespace Friendica\Test\src\Module\Api\Friendica\Photo;
namespace Friendica\Test\src\Module\Api\Friendica\Photoalbum;
use Friendica\Module\Api\Friendica\Photoalbum\Update;
use Friendica\Network\HTTPException\BadRequestException;
@ -26,7 +26,7 @@ class UpdateTest extends ApiTest
Update::rawContent(['album' => 'album_name', 'album_new' => 'album_name']);
}
public function testUpdateWithoutAuthenticatedUser()
public function testWithoutAuthenticatedUser()
{
self::markTestIncomplete('Needs BasicAuth as dynamic method for overriding first');
}