| @@ 30-43 (lines=14) @@ | ||
| 27 | /** |
|
| 28 | * @test |
|
| 29 | */ |
|
| 30 | public function canPost() |
|
| 31 | { |
|
| 32 | $content = [ |
|
| 33 | 'foo' => 'bar', |
|
| 34 | 'blah' => ['foobar'] |
|
| 35 | ]; |
|
| 36 | ||
| 37 | $responseData = $this->post('/data/v1/entity/foo', $content); |
|
| 38 | ||
| 39 | $this->assertInternalType('int', $responseData->id); |
|
| 40 | $this->assertSame($content['foo'], $responseData->foo); |
|
| 41 | $this->assertSame($content['blah'], $responseData->blah); |
|
| 42 | $this->assertSame('foo', $responseData->type); |
|
| 43 | } |
|
| 44 | ||
| 45 | /** |
|
| 46 | * @test |
|
| @@ 117-130 (lines=14) @@ | ||
| 114 | /** |
|
| 115 | * @test |
|
| 116 | */ |
|
| 117 | public function canPut() |
|
| 118 | { |
|
| 119 | $content = [ |
|
| 120 | 'foo' => 'bar', |
|
| 121 | 'blah' => ['foobar'] |
|
| 122 | ]; |
|
| 123 | ||
| 124 | $responseData = $this->put('/data/v1/entity/foo/999', $content); |
|
| 125 | ||
| 126 | $this->assertSame(999, $responseData->id); |
|
| 127 | $this->assertSame($content['foo'], $responseData->foo); |
|
| 128 | $this->assertSame($content['blah'], $responseData->blah); |
|
| 129 | $this->assertSame('foo', $responseData->type); |
|
| 130 | } |
|
| 131 | } |
|
| 132 | ||