/**
  * @test
  */
 public function parseBodyTest()
 {
     /** @var Request $dummyRequest */
     $dummyRequest = new FormDataBodyParserTest_DummyRequestClass();
     $this->assertArrayHasKey('email', $this->fixture->parse('email=test%40cundd.net&name=Daniel', $dummyRequest));
     $this->assertArrayHasKey('email', $this->fixture->parse('name=Daniel&email=test%40cundd.net', $dummyRequest));
     $this->assertArrayHasKey('email', $this->fixture->parse('email=test%40cundd.net', $dummyRequest));
 }
示例#2
0
 /**
  * @test
  * @expectedException \Cundd\PersistentObjectStore\Server\Exception\InvalidBodyException
  */
 public function parseEmptyBodyTest()
 {
     /** @var Request $dummyRequest */
     $dummyRequest = new JsonBodyParserTest_DummyRequestClass();
     $this->fixture->parse('', $dummyRequest);
 }