c3lf-system-3/tests/ApiTest.php

44 lines
1 KiB
PHP
Raw Permalink Normal View History

2020-01-17 23:39:45 +00:00
<?php
use App\Event;
class ApiTest extends TestCase
{
public function testRoot(){
$this->get('/');
$this->assertEquals(
$this->app->version(), $this->response->getOriginalContent()['framework_version']
);
}
public function testEvents()
{
$this->get('/1/events');
$this->assertResponseOk();
$this->assertEquals('[]',$this->response->getContent());
}
public function testContainers()
{
$this->get('/1/boxes');
$this->assertResponseOk();
$this->assertEquals('[]',$this->response->getContent());
}
public function testFiles()
{
$this->get( '/1/files');
$this->assertResponseOk();
$this->assertEquals('[]',$this->response->getContent());
}
public function testItems()
{
Event::create(['slug'=>'TEST1','name'=>'Test Event 1']);
$this->get('/1/TEST1/items');
$this->assertResponseOk();
$this->assertEquals('[]',$this->response->getContent());
}
}