public function testOneWhenMany() { $this->setExpectedException('Pheasant\\ConstraintException'); $results = Animal::find()->one(); }