Commit 3dbb3d40 by Paul Klimov

Sphinx unit tests fixed.

parent dc79c8c1
...@@ -1385,6 +1385,8 @@ abstract class ActiveRecord extends Model ...@@ -1385,6 +1385,8 @@ abstract class ActiveRecord extends Model
$this->populateRelation($offset, $item); $this->populateRelation($offset, $item);
return; return;
} }
} catch (InvalidParamException $e) {
// shut down exception : has getter, but not relation
} catch (UnknownMethodException $e) { } catch (UnknownMethodException $e) {
throw $e->getPrevious(); throw $e->getPrevious();
} }
......
...@@ -79,10 +79,10 @@ class ActiveRecordTest extends SphinxTestCase ...@@ -79,10 +79,10 @@ class ActiveRecordTest extends SphinxTestCase
// asArray // asArray
$article = ArticleIndex::find()->where('id=2')->asArray()->one(); $article = ArticleIndex::find()->where('id=2')->asArray()->one();
unset($article['add_date']);
$this->assertEquals([ $this->assertEquals([
'id' => '2', 'id' => '2',
'author_id' => '2', 'author_id' => '2',
'add_date' => '1384466400',
'tag' => '3,4', 'tag' => '3,4',
], $article); ], $article);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment