Browse Source

Sphinx unit tests fixed.

tags/2.0.0-beta
Paul Klimov 11 years ago
parent
commit
3dbb3d40dd
  1. 2
      extensions/sphinx/ActiveRecord.php
  2. 2
      tests/unit/extensions/sphinx/ActiveRecordTest.php

2
extensions/sphinx/ActiveRecord.php

@ -1385,6 +1385,8 @@ abstract class ActiveRecord extends Model
$this->populateRelation($offset, $item);
return;
}
} catch (InvalidParamException $e) {
// shut down exception : has getter, but not relation
} catch (UnknownMethodException $e) {
throw $e->getPrevious();
}

2
tests/unit/extensions/sphinx/ActiveRecordTest.php

@ -79,10 +79,10 @@ class ActiveRecordTest extends SphinxTestCase
// asArray
$article = ArticleIndex::find()->where('id=2')->asArray()->one();
unset($article['add_date']);
$this->assertEquals([
'id' => '2',
'author_id' => '2',
'add_date' => '1384466400',
'tag' => '3,4',
], $article);

Loading…
Cancel
Save