Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gammamatrix committed May 2, 2024
1 parent 1b34510 commit 5b1f436
Show file tree
Hide file tree
Showing 21 changed files with 198 additions and 175 deletions.
15 changes: 0 additions & 15 deletions src/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,4 @@ abstract class Controller extends BaseController
use AuthorizesRequests;
use ValidatesRequests;
// use DispatchesJobs;

protected function getViewPath(
string $controller = '',
string $view = ''
): string {
$basePath = config('playground-matrix-resource.blade');

return sprintf(
'%1$s%2$s%3$s%4$s',
empty($basePath) || ! is_string($basePath) ? '' : $basePath,
$controller,
$view ? '/' : '',
$view
);
}
}
2 changes: 1 addition & 1 deletion src/Http/Controllers/TicketController.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ protected function getProjectKey(Ticket $ticket): string
$key = config('playground-matrix-resource.default_key');
$key = is_string($key) ? $key : '';

$project = $ticket->project_id ? $ticket->project() : null;
$project = $ticket->project_id ? $ticket->project()->first() : null;

if (! empty($project->key) && is_string($project->key)) {
$key = $project->key;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
class BacklogRouteTest extends BacklogTestCase
{
use TestTrait;
protected bool $load_migrations_package = true;

protected bool $load_migrations_playground = true;

protected bool $load_migrations_matrix = true;
protected bool $setUpUserForPlayground = true;
}
4 changes: 2 additions & 2 deletions tests/Feature/Http/Controllers/Playground/BoardRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
class BoardRouteTest extends BoardTestCase
{
use TestTrait;
protected bool $load_migrations_package = true;

protected bool $load_migrations_playground = true;

protected bool $load_migrations_matrix = true;
protected bool $setUpUserForPlayground = true;
}
4 changes: 2 additions & 2 deletions tests/Feature/Http/Controllers/Playground/EpicRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
class EpicRouteTest extends EpicTestCase
{
use TestTrait;
protected bool $load_migrations_package = true;

protected bool $load_migrations_playground = true;

protected bool $load_migrations_matrix = true;
protected bool $setUpUserForPlayground = true;
}
4 changes: 2 additions & 2 deletions tests/Feature/Http/Controllers/Playground/FlowRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
class FlowRouteTest extends FlowTestCase
{
use TestTrait;
protected bool $load_migrations_package = true;

protected bool $load_migrations_playground = true;

protected bool $load_migrations_matrix = true;
protected bool $setUpUserForPlayground = true;
}
4 changes: 3 additions & 1 deletion tests/Feature/Http/Controllers/Playground/IndexRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
*/
class IndexRouteTest extends TestCase
{
protected bool $load_migrations_package = true;

protected bool $load_migrations_playground = true;

protected bool $load_migrations_matrix = true;
protected bool $setUpUserForPlayground = true;

public function test_guest_cannot_render_index_view(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
class MilestoneRouteTest extends MilestoneTestCase
{
use TestTrait;
protected bool $load_migrations_package = true;

protected bool $load_migrations_playground = true;

protected bool $load_migrations_matrix = true;
protected bool $setUpUserForPlayground = true;
}
4 changes: 2 additions & 2 deletions tests/Feature/Http/Controllers/Playground/NoteRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
class NoteRouteTest extends NoteTestCase
{
use TestTrait;
protected bool $load_migrations_package = true;

protected bool $load_migrations_playground = true;

protected bool $load_migrations_matrix = true;
protected bool $setUpUserForPlayground = true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
class ProjectRouteTest extends ProjectTestCase
{
use TestTrait;
protected bool $load_migrations_package = true;

protected bool $load_migrations_playground = true;

protected bool $load_migrations_matrix = true;
protected bool $setUpUserForPlayground = true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
class ReleaseRouteTest extends ReleaseTestCase
{
use TestTrait;
protected bool $load_migrations_package = true;

protected bool $load_migrations_playground = true;

protected bool $load_migrations_matrix = true;
protected bool $setUpUserForPlayground = true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
class RoadmapRouteTest extends RoadmapTestCase
{
use TestTrait;
protected bool $load_migrations_package = true;

protected bool $load_migrations_playground = true;

protected bool $load_migrations_matrix = true;
protected bool $setUpUserForPlayground = true;
}
4 changes: 2 additions & 2 deletions tests/Feature/Http/Controllers/Playground/SourceRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
class SourceRouteTest extends SourceTestCase
{
use TestTrait;
protected bool $load_migrations_package = true;

protected bool $load_migrations_playground = true;

protected bool $load_migrations_matrix = true;
protected bool $setUpUserForPlayground = true;
}
4 changes: 2 additions & 2 deletions tests/Feature/Http/Controllers/Playground/SprintRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
class SprintRouteTest extends SprintTestCase
{
use TestTrait;
protected bool $load_migrations_package = true;

protected bool $load_migrations_playground = true;

protected bool $load_migrations_matrix = true;
protected bool $setUpUserForPlayground = true;
}
4 changes: 2 additions & 2 deletions tests/Feature/Http/Controllers/Playground/TagRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
class TagRouteTest extends TagTestCase
{
use TestTrait;
protected bool $load_migrations_package = true;

protected bool $load_migrations_playground = true;

protected bool $load_migrations_matrix = true;
protected bool $setUpUserForPlayground = true;
}
4 changes: 2 additions & 2 deletions tests/Feature/Http/Controllers/Playground/TeamRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
*/
class TeamRouteTest extends TeamTestCase
{
use TestTrait;
protected bool $load_migrations_package = true;

protected bool $load_migrations_playground = true;

protected bool $load_migrations_matrix = true;
protected bool $setUpUserForPlayground = true;
}
66 changes: 0 additions & 66 deletions tests/Feature/Http/Controllers/Playground/TestTrait.php

This file was deleted.

Loading

0 comments on commit 5b1f436

Please sign in to comment.