You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
658 B

<?php
class ExampleTest extends TestCase
{
public function testHomePageLoads()
{
$response = $this->request('GET', '/');
$this->assertSame(200, $response->getStatusCode());
$this->assertStringContainsString('Compass', $response->getContent());
}
public function testApiInputRequiresToken()
{
$response = $this->request('GET', '/api/input');
$this->assertSame(200, $response->getStatusCode());
$this->assertSame('application/json', $response->headers->get('Content-Type'));
$this->assertSame(['error' => 'no token provided'], json_decode($response->getContent(), true));
}
}