public function testFindByContact() { /* |------------------------------------------------------------ | Set |------------------------------------------------------------ */ $contacts = Contact::findBy(array("Where" => 'Name.Contains("John Smith")')); /* |------------------------------------------------------------ | Assertion |------------------------------------------------------------ */ $this->assertTrue($contacts instanceof Collection); }
public function testCollection() { /* |------------------------------------------------------------ | Set |------------------------------------------------------------ */ $collection = Contact::newCollection(); /* |------------------------------------------------------------ | Assertion |------------------------------------------------------------ */ $this->assertTrue($collection instanceof Collection); $this->assertTrue(count($collection) == 0); }