PATCH increment
This commit is contained in:
parent
684225f45e
commit
7ec8dfbc20
1 changed files with 0 additions and 63 deletions
|
|
@ -684,69 +684,6 @@ class PHP_CRUD_API_Test extends PHPUnit_Framework_TestCase
|
|||
$test->expect('{"id":1,"name":"Launch","datetime":"2016-01-01 13:01:01.111","visitors":6}');
|
||||
}
|
||||
|
||||
public function testIncrementEventDateTime()
|
||||
{
|
||||
$test = new API($this);
|
||||
$test->patch('/events/1','{"datetime":"1:00"}');
|
||||
$test->expect('1');
|
||||
$test->get('/events/1');
|
||||
$test->expect('{"id":1,"name":"Launch","datetime":"2016-01-01 13:02:01.111","visitors":6}');
|
||||
}
|
||||
|
||||
public function testIncrementEventDateTimeNumeric()
|
||||
{
|
||||
$test = new API($this);
|
||||
$test->patch('/events/1','{"datetime":120}');
|
||||
$test->expect('1');
|
||||
$test->get('/events/1');
|
||||
$test->expect('{"id":1,"name":"Launch","datetime":"2016-01-01 13:04:01.111","visitors":6}');
|
||||
}
|
||||
|
||||
public function testIncrementEventDateTimeWithZero()
|
||||
{
|
||||
$test = new API($this);
|
||||
$test->patch('/events/1','{"datetime":0}');
|
||||
$test->expect('1');
|
||||
$test->get('/events/1');
|
||||
$test->expect('{"id":1,"name":"Launch","datetime":"2016-01-01 13:04:01.111","visitors":6}');
|
||||
}
|
||||
|
||||
public function testDecrementEventDateTime()
|
||||
{
|
||||
$test = new API($this);
|
||||
$test->patch('/events/1','{"datetime":"-1 0:03:01.001"}');
|
||||
$test->expect('1');
|
||||
$test->get('/events/1');
|
||||
$test->expect('{"id":1,"name":"Launch","datetime":"2015-12-31 12:01:00.110","visitors":6}');
|
||||
}
|
||||
|
||||
public function testIncrementEventName()
|
||||
{
|
||||
$test = new API($this);
|
||||
$test->patch('/events/1','{"name":"? "}');
|
||||
$test->expect('1');
|
||||
$test->get('/events/1');
|
||||
$test->expect('{}');
|
||||
}
|
||||
|
||||
public function testIncrementEventNameWithFalsy()
|
||||
{
|
||||
$test = new API($this);
|
||||
$test->patch('/events/1','{"name":false}');
|
||||
$test->expect('1');
|
||||
$test->get('/events/1');
|
||||
$test->expect('{}');
|
||||
}
|
||||
|
||||
public function testIncrementEventNameWithNumber()
|
||||
{
|
||||
$test = new API($this);
|
||||
$test->patch('/events/1','{"name":43}');
|
||||
$test->expect('1');
|
||||
$test->get('/events/1');
|
||||
$test->expect('{}');
|
||||
}
|
||||
|
||||
public function testListTagUsage()
|
||||
{
|
||||
$test = new API($this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue