Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#file /app/Test/Case/Model/ContactTest.php
public function testGetAllContacts() {
//prendo i records dal modello
$result = $this->Contact->getAllContacts();
//questo è il risultato che mi aspetto
$exptected = array(
array('Contact' => array('id' => 1, 'name' => 'Walter', 'surname' => 'Raponi') ),
array('Contact' => array('id' => 2, 'name' => 'Emiliano', 'surname' => 'Merlin') ),
//qui verifico che i due array corrispondano
$this->assertEquals($exptected, $result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment