/**
  * afterFind callback
  *
  * @param Model $model Model using the behavior
  * @param array $results The results of the find operation
  * @param bool $primary Whether this model is being queried directly
  * @return array
  */
 public function afterFind(Model $model, $results, $primary = false)
 {
     return EagerLoader::handleAfterFind($model, $results);
 }
 /**
  * Tests that an exception occurs if invalid ID specified
  *
  * @return void
  *
  * @expectedException UnexpectedValueException
  * @expectedExceptionMessage EagerLoader "foo" is not found
  */
 public function testNotFound()
 {
     $User = ClassRegistry::init('User');
     EagerLoader::handleAfterFind($User, array(array('EagerLoaderModel' => array('id' => 'foo'))));
 }