Created
February 26, 2016 23:55
-
-
Save cakephp-tutorial/bf0159f1e529f096c1e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#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