Esempio n. 1
0
 public function testGetResponses()
 {
     $this->if($this->mockGenerator->shuntParentClassCalls())->and($request = new \mock\Philip\IRC\Request($raw = uniqid()))->and($object = new TestedClass($request))->and($matches = array(uniqid(), uniqid()))->then->array($object->getResponses())->isEmpty()->if($response = new \Philip\IRC\Response(uniqid()))->and($object->addResponse($response))->then->array($object->getResponses())->isEqualTo(array($response))->if($otherResponse = new \Philip\IRC\Response(uniqid()))->and($object->addResponse($otherResponse))->then->array($object->getResponses())->isEqualTo(array($response, $otherResponse));
 }