Skip to content

Commit

Permalink
Merge pull request #116 from bearsunday/http-test
Browse files Browse the repository at this point in the history
Update http test
  • Loading branch information
koriym authored May 24, 2021
2 parents 6e9a2ec + 1e95f97 commit d852bf5
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions tests/Http/WorkflowTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,13 @@

namespace BEAR\Skeleton\Http;

use BEAR\Dev\Http\BuiltinServerStartTrait;
use BEAR\Resource\ResourceObject;
use BEAR\Dev\Http\HttpResource;
use BEAR\Skeleton\Hypermedia\WorkflowTest as Workflow;
use BEAR\Skeleton\Injector;

class WorkflowTest extends Workflow
{
use BuiltinServerStartTrait;

protected function setUp(): void
{
$_SERVER['Authorization'] = '_secret_token_';
$this->resource = $this->getHttpResourceClient(Injector::getInstance('app'), self::class);
}

public function testIndex(): ResourceObject
{
$index = $this->resource->get($this->httpHost . '/');
$this->assertSame(200, $index->code);

return $index;
$this->resource = new HttpResource('127.0.0.1:8080', __DIR__ . '/index.php', __DIR__ . '/log/workflow.log');
}
}

0 comments on commit d852bf5

Please sign in to comment.